Hey all - we've populated datahub with table linea...
# getting-started
r
Hey all - we've populated datahub with table lineage and I want to be able to make a call to DataHub to get the downstream lineage given a specific table. I can't seem to find anything that would do that through the OpenApi or GraphQL Api setup. Is there something I'm missing here?
i
Hello Laura, Could you share some of what you tried? For OpenAPI have you checked out the docs: https://datahubproject.io/docs/api/openapi/openapi-usage-guide#example-requests ? All DataHub deployments come with a swagger page & graphiql interfaces to experiment on. Here is the swagger link for demo: https://demo.datahubproject.io/openapi/swagger-ui/index.html And for GraphQL: https://demo.datahubproject.io/api/graphiql
r
For openApi there only seems to be a DatasetUpstreamLineage call, none for downstream. I did find the
searchAcrossLineage
call through GraphSql which I think looks promising. But I found the documentation on how to use it very confusing.
g
Hey Luara! You can refer to queries here for examples:
Copy code
query getEntityLineage($urn: String!) {
    entity(urn: $urn) {
        urn
        type
        ...lineageNodeProperties
        ... on Dataset {
            siblings {
                isPrimary
                siblings {
                    urn
                    type
                    ...lineageNodeProperties
                }
            }
        }
        ... on EntityWithRelationships {
            upstream: lineage(input: { direction: UPSTREAM, start: 0, count: 100 }) {
                ...fullLineageResults
            }
            downstream: lineage(input: { direction: DOWNSTREAM, start: 0, count: 100 }) {
                ...fullLineageResults
            }
        }
    }
}
r
awesome! thank you 🙂
f
@rhythmic-stone-77840 did you completed your downstream? I accomplished the upstream lineage with file-based .yml lineage. But i cant make downstream lineage work
r
We're still working things out - but as far as I know through the API you can only set the upstream lineage for a dataset. Once your datasets have their lineage filled out you'll be able to search all the downstream column lineage on a dataset once the Column Lineage UI updates are released (they were demo'd in the

last town hall meetingâ–¾

)