Hello everyone! I'm new in datahub i use this ins...
# ui
c
Hello everyone! I'm new in datahub i use this instruction to create datalineage https://datahubproject.io/docs/metadata-modeling/metadata-model but i don't understand , where i could write this code? // Case 1: # key fields == 1 urnli<entity-name>:key-field-1 i would like to create 2 asset and create 1 relationship please , help me )
g
Hey! You would add the
.pdl
files to the
metadata-models/src/main/pegasus/com/linkedin/
package
The urn strings that you are referring to
urn:li:<entity-name>:key-field-1
, this is written on the ingestion side
This document https://datahubproject.io/docs/metadata-ingestion has instructions for working with the ingestion framework
Welcome to the DataHub community 🙂
c
thank you! i red it if i understand i must use metadata-ingestion to create asset ? can i create asset manual?
g
to create assets manually, you want to use the json source
take a look at this sample recipe:
This is ingesting some sample data from a json file- you could construct a similar one
c
i see, thank you for your helping! one more question please in the internet i found this code curl 'http://localhost:8080/datasets?action=ingest' -X POST -H 'X-RestLi-Protocol-Version:2.0.0' --data ' { "snapshot":{ "aspects":[{"com.linkedin.dataset.DatasetProperties":{ "description":"descriptionForTest2","tags":["tag1","tag2"], "customProperties":{}}}], "urn":"urnlidataset:(urnlidataPlatform:hdfs,test2,EI)"} }' is it valid ?
g
this may work, but i highly advise against using curls like that
error messages will be less clear and you won't get to take advantage of the type safety of the ingestion framework
using the datahub ingestion framework is easy- I promise! Just create a .json file with the metadata you want to ingest like
bootstrap_mce.json
, add it a recipe like the example above and run
datahub ingest -c
on that file!
c
Ok! i will try! thank you very much ! 🤝
teamwork 1