Hello. I could use some guidance on how to progra...
# getting-started
p
Hello. I could use some guidance on how to programatically query for lineage using any of the Rest, Graphql, or Python SDK methods. I have a set of RDS tables that are synced using fivetran to snowflake. I want to propegate the domain and group of the RDS tables through the fivetran tables that function as DBT sources. I have found the docs to be pretty good and have been able to use the python sdk to do some metadata decoration of datasets, but I am stuck trying to query for downstream dependencies of a dataset. I don’t see examples of this funcitonality here. I’ve tried making an http call to the relationships endpoint, but it does not return the data I am expecting. I have tried both
/relationships
and
/openapi/relationships/
. I have looked for documentation on the acceptable values for the url query params
direction
,
types
, and
relationshipTypes
, but can’t seem to find this endpoint documented on the datahub site. I also see a call being made to the
/api/v2/graphql
when I look at the lineage in the U.I. It uses a query of type
getEntityLineage
. When I search for
getEntityLineage
in the datahub docs, I get no results. We have many flows and use cases where we would like to use datahub to provide dataset lineage outside of the U.I. Can someone point me in the right direction for how to pull this out of the system? Any of the python sdk, graphql, or rest api is fine by me.
🩺 1
I was able to figure out the graphql Api call.
a
Hi, is this resolved for you then?
p
Yes.
a
Hi @powerful-flag-14641! Could you share de query you used to read lineage from a dataset with graphql? Thanks in advance! :)
p
I basically just opened the network tools of my browser and copied the query that the datahub frontend uses when querying for lineage for a dataset.