Hello! How can I use the datahub cli to get upstre...
# getting-started
c
Hello! How can I use the datahub cli to get upstreams of a dataset?
datahub get --urn ...
does not show me lineage information. Thanks!
l
Hello @calm-balloon-31412, The following command should work
Copy code
datahub get --urn "<you-urn>" --aspect upstreamLineage | jq
c
thank you! will this only show me upstream datasets and not data jobs?
also for some reason when I try this with a datajob urn, I get an empty
{}
vs in the UI I'm seeing upstream job and dataset
m
According to the entity documentation here the Consumes relationship is powered by
dataJobInputOutput.inputDatasets
so in this case you would be doing:
Copy code
datahub get --urn "<datajob-urn>" --aspect dataJobInputOutput
@calm-balloon-31412 did this suggestion work for you?
c
sorry about the late response, turns out I was running this against my local env instead of production data which is why there were no results showing up! 🤦
m
No worries. This definitely happens quite often.