Area: Product Issues
Sub-Area: Column Description Propagation / Lineage Automation
Applies to: OSS + Cloud
Issue
You add column-level lineage between two datasets, for example with the Python SDK. The upstream columns already have descriptions, and documentation propagation is on. The downstream columns do not get those descriptions. When you edit one upstream column's description in the UI, that one column propagates right away.
You Might Be Asking
- Why did the column I edited in the UI propagate, but the columns with ingested descriptions did not?
- Why doesn't adding column-level lineage propagate the descriptions that already exist upstream?
- How do I propagate the existing descriptions without editing every column?
- Is this a bug?
Cause
Documentation propagation reacts to description changes, not to lineage changes.
When a column description is added, changed or removed, DataHub emits a documentation change event for that column. The propagation action reads the event and copies the description to the columns linked to it by column-level lineage and siblings. This happens for both kinds of column descriptions:
- Ingested descriptions, which ingestion writes to
schemaMetadata. - Edited descriptions, which a UI edit or the
updateDescriptionGraphQL mutation writes toeditableSchemaMetadata.
When you add lineage after the descriptions exist, no description changes, so no event fires and nothing propagates. When you edit a column in the UI, its description changes, so that column propagates. On DataHub Cloud, the Lineage Propagation automation also does not run when a column lineage link is added.
Two more rules apply in open source DataHub and in the Column Documentation Propagation automation on DataHub Cloud:
- A downstream column gets the description only when it has exactly one upstream column. A column with two or more upstream columns is skipped.
- Only column descriptions propagate. Table descriptions do not.
Solution
DataHub Cloud: run a backfill
- Go to Govern > Automations.
- Find the automation that propagates documentation. Since v2.2.0, new automations of this kind are Lineage Propagation automations with documentation selected. Older ones are named Column Documentation Propagation.
- Click the 3-dot menu on the automation, then click Initialize.
Initialize is a one-time backfill for existing descriptions. It covers every dataset that has column descriptions, not one table, so it can take a while on a large instance. See Documentation Propagation Automation.
Open source DataHub: change the upstream descriptions
Open source DataHub has no backfill for existing descriptions. To propagate a column's description, change that description on the upstream column:
- In the UI, edit the column's description and save it.
- For many columns, run the
updateDescriptionGraphQL mutation for each upstream column. SetsubResourceto the column's field path andsubResourceTypetoDATASET_FIELD. See Add Description on Column.
mutation updateDescription {
updateDescription(
input: {
description: "Name of the user who was deleted."
resourceUrn: "urn:li:dataset:(urn:li:dataPlatform:hive,fct_users_deleted,PROD)"
subResource: "user_name"
subResourceType: DATASET_FIELD
}
)
}
This works on DataHub Cloud too, for a few columns. Keep these points in mind:
- The event fires only when the stored edited text changes. If the column already has an edited description and you save the same text again, nothing propagates.
- The text you save becomes the column's edited description. It shows instead of the ingested description, and later changes to the description in the source system do not show on that column.
Do not write the documentation aspect yourself
Emitting a DocumentationClass aspect does not trigger propagation the way you expect:
- The propagation action ignores a
documentationaspect on a dataset URN. It only reads it on a column (schemaField) URN. - An entry without an
attributionmakes the action fail for that event, so nothing propagates. - Writing the whole aspect replaces the entries already stored on that column, including descriptions that propagation put there.
Check the result
On the downstream column, an edited description shows first, then the ingested description. The propagated description shows only when the column has neither. Propagated descriptions show a thunderbolt icon, and its tooltip shows where the description came from.
Propagation also needs correct column-level lineage. Check the lineage on the downstream column before you look further. See Add Column Lineage with Custom Mapping.
Related Documentation
- Documentation Propagation Automation
- Descriptions API tutorial
- Lineage API tutorial
- DataHub Cloud v2.2.0 release notes
Tags: column-description-propagation, lineage, programmatic-lineage, python-sdk, documentation-propagation, backfill, automations, column-lineage