How to Automatically Fetch Lineage Details of an Ingested Database Using Python

Original Slack Thread

Hi everyone,
I am actually looking to get to know how to get lineage details like upstream downstream details of a ingested database automatically using python.
Can u please guide me what I need to do to get those details?

you can use graphql queries to get lineage information with search
https://datahub.stats.zynga.com/api/graphiql#|searchAcrossLineage(input: https://datahub.stats.zynga.com/api/graphiql#|SearchAcrossLineageInput!):

or
https://datahub.stats.zynga.com/api/graphiql#|entity(urn: https://datahub.stats.zynga.com/api/graphiql#|String!): https://datahub.stats.zynga.com/api/graphiql#|Entity to get lineage info about a specific entity