Area: Product Issues
Sub-Area: Impact Analysis and Data Lineage
Applies to: OSS + Cloud
Issue
You need to download impact analysis reports based on column-level or table-level lineage. You want to see the downstream and upstream impact of changes to your data models before you change a column or table.
You Might Be Asking
- How can I export lineage data for impact assessment?
- Can I download a report showing which datasets depend on a specific table or column?
- Is there a way to get a CSV export of upstream and downstream dependencies?
- How do I get column-to-column lineage detail through the API?
Solution
Impact Analysis needs no extra configuration. Any user with the View Entity Page privilege can see the full upstream or downstream list and export it to CSV. The Lineage tab is greyed out when no lineage has been ingested for that entity. See Impact Analysis.
Table-level impact analysis
- Open a dataset and click the Lineage tab.
- Switch from Explorer to the Impact Analysis view.
- Select Upstream or Downstream.
- Apply filters as needed:
- Degree of dependency. The default is 1 degree. The indirect option adds the values
2and3+. - Entity Type, Platform, Owner and other filters.
- Degree of dependency. The default is 1 degree. The indirect option adds the values
- Click the Download button. Its tooltip reads "Download results...". The dialog is titled "Download as...".
- Name the file and download the CSV. When you export from an entity page, the suggested file name is
<entity name>_impact.csv.
Column-level impact analysis
- Follow steps 1 to 3 above.
- Use the column lineage selector in the same view. You can search it and clear it.
- Pick the column you want to analyze.
- Apply any filters you need.
- Click the Download button to export the results.
Export details
The export is limited to 10,000 records. The export progress shows "10,000+" when you hit the limit. Apply filters to narrow the list.
The UI list can include soft-deleted or non-existent (ghost) assets for large result sets. The CSV filters them out, so the CSV can have fewer rows than the UI shows. The dialog warns: "Search results include referenced assets even if they don't exist. We'll only download the assets that exist in DataHub."
DataHub Cloud CSV columns: urn, name, type, description, user owners, user owner emails, group owners, group owner emails, tags, terms, domain, platform, container, entity url, view count, unique users, row count, size in bytes, queries last month. Exports from Impact Analysis also include level of dependency, a number (1, 2, 3 and so on).
OSS CSV columns: the list ends with platform, container and entity url. Level of dependency is added when the result has a numeric degree. View count, unique users, row count, size in bytes and queries last month are in the DataHub Cloud export only.
For column-level lineage, the export lists the impacted entities. It does not include the column-to-column transformation path.
Get column-to-column detail with the API
Column-level lineage is exposed in GraphQL as fineGrainedLineages on Dataset (and DataJob). Each entry has upstreams, downstreams (lists of schema field references), query and transformOperation. The searchAcrossLineage results have no fineGrainedLineages field. The matchedFields field on a result is a search-hit hint with name and value, and carries no lineage data.
On DataHub Cloud, send GraphQL requests to https://<your-account>.acryl.io/api/graphql with the header Authorization: Bearer <token>. See GraphQL API getting started and Personal Access Tokens.
You can also use the Python SDK. DataHubClient.from_env().lineage.get_lineage(source_urn=..., source_column=...) returns column-level lineage. See the lineage tutorial.
List impacted entities with GraphQL
searchAcrossLineage requires urn (the starting entity) and direction (UPSTREAM or DOWNSTREAM). To set hops, use an orFilters degree filter. Use lineageFlags for time filtering. See SearchAcrossLineageInput and the lineage tutorial.
query {
searchAcrossLineage(
input: {
urn: "<urn>"
direction: DOWNSTREAM
start: 0
count: 100
orFilters: [{ and: [{ field: "degree", condition: EQUAL, values: ["1", "2", "3+"] }] }]
}
) {
total
searchResults {
entity {
urn
type
}
degree
}
}
}
For paging with scrollAcrossLineage, use scrollId in and nextScrollId out. It has no start field.