feat(ingestion/fabric): emit notebook column lineage from code renames
ST
1d ago+2213+2213+0123456789012345678901234567890123456789-96-96-01234567890123456789
Summary
- When
notebook_execution.reconcile_codeis on, Python notebook column renames are emitted as column-level lineage on the Spark job that writes each table. - Covers
col(src).alias(dst),{source: target}mapping dicts,alias.*,df["column"], and select lists built before they are applied (select(*select_exprs)). Literal columns are omitted. An edge is kept only when both tables were resolved by the Spark plan and ingested in the same run. - Column names use the same normalization as schema fields, so a code name such as
person_PersonPartymatchesperson_personpartywhenconvert_urns_to_lowercaseis on.
Column lineage is stored on the job's dataJobInputOutput.fineGrainedLineages, not on the dataset upstreamLineage aspect.
Test plan
-
pytest metadata-ingestion/tests/unit/fabric_onelake/test_notebook_code_lineage.py metadata-ingestion/tests/unit/fabric_onelake/test_notebook_jobs.py - Ingest a notebook with
include_notebooks: true,notebook_execution.enabled: true, andreconcile_code: true - On the Spark job, confirm
inputOutput.fineGrainedLineageslinks each output field to its upstream field - Confirm
reconcile_code: falsestill emits table lineage and no column edges - With
convert_urns_to_lowercase: true, confirm field paths match the lowercased schema fields