Data Lineage for AI and ML Engineering
Definition
Data lineage records how identifiable datasets move through transformations and execution runs to downstream assets. It connects inputs, jobs and outputs so engineers can trace origins or inspect dependencies. Table-level lineage links datasets; column-level lineage maps derived fields to source fields. OpenLineage standardizes metadata events, while catalogs store and expose dependency graphs. Lineage describes provenance, but does not itself preserve data snapshots or guarantee reproducibility.
Why it matters for AI jobs
AI platform and research-data roles need engineers who can explain which source changes affected training features, evaluation sets or retrieval corpora. Lineage supports incident diagnosis, change-impact analysis and evidence for governance reviews. A portfolio that traces a broken feature back to its source demonstrates production reasoning beyond pipeline syntax. Pair lineage with versioned inputs, code revisions and tests: a dependency graph alone neither proves data quality nor establishes compliance.
Key concepts
- Dataset identity: Use stable namespace and name pairs; attach versions or partitions when the storage system supports them.
- Jobs versus runs: A job describes a transformation; a run identifies one execution with its own inputs, outputs and completion state.
- Granularity: Table-level lineage supports broad dependency analysis; column-level lineage helps trace specific feature derivations.
- Collection and storage: OpenLineage defines events and integration mechanisms; a compatible backend such as Marquez receives and exposes them. Unity Catalog offers integrated capture for supported Databricks workloads.
- Facets: OpenLineage extends metadata with schema, dataset versions, input partitions and quality information rather than copying dataset contents into events.
- ML context: MLflow dataset tracking records source, digest and optional schema or profile, and links inputs to runs with
mlflow.log_input(); it is not automatic end-to-end column lineage. - Coverage boundaries: Unsupported operations, opaque transformations and missing instrumentation create gaps. Record these explicitly and restrict access to sensitive metadata.
Learning path
- Build a small pipeline that joins two public tables into a feature table. Record input locations, a data snapshot identifier and the code revision, then draw the expected dependency graph.
- Instrument the pipeline with an appropriate OpenLineage integration or client and send events to a compatible backend. Check that a completed run has the correct input and output dataset identities; verify connector compatibility before using older tutorials.
- Train a simple baseline and use MLflow dataset tracking to log training and validation inputs with distinct contexts. Link the experiment to the feature snapshot and code revision rather than treating a dataset digest as an archived copy.
- Change a source column and trace its downstream consumers. Compare observed lineage with the expected graph, document missing column mappings and add a schema or quality test.
- Publish a portfolio report with the dependency graph, an upstream root-cause investigation, a downstream impact assessment and a repeatable run. If Databricks is available, compare Unity Catalog capture against its documented limitations.