Data lineage

On this page 7

Data lineage is the record of where data originates, how it is transformed and where it moves on its way from source systems to reports, models and applications. In data management, lineage connects every dataset to its upstream inputs and downstream consumers, forming a dependency graph across pipelines, databases and tools.

Lineage answers practical questions that otherwise take days of investigation: which source feeds this dashboard, which reports break if a column is renamed, and which records contain personal data after it has been copied and joined. It is a foundation of data quality work, data governance and regulatory compliance.

How data lineage is represented

Lineage is modeled as a directed acyclic graph. Nodes are datasets such as tables, files, topics or reports, and edges are the processes that transform them, such as SQL queries, ETL jobs or notebooks. Each edge can carry metadata: the job that ran, its code version, the time it ran and whether it succeeded.

Two directions matter. Upstream lineage follows a dataset back to its sources and supports root-cause analysis; downstream lineage follows it forward to every consumer and supports impact analysis before a change. Most investigations use both.

GranularityWhat is trackedTypical use
System levelFlows between applications and platformsArchitecture overview and audits
Dataset levelTable or file dependenciesPipeline debugging and impact analysis
Column levelWhich source columns feed each target columnTracing sensitive fields and metric definitions
Row or value levelOrigin of individual recordsRegulated reporting and dispute resolution
Levels of lineage granularity

Finer granularity is more useful but more expensive to capture and store. Column-level lineage has become the practical target for many analytics teams, while row-level lineage is usually reserved for domains where individual values must be explained.

Ways to capture lineage

Lineage can be collected in several ways, and mature platforms combine them because no single method sees everything. The table compares the main approaches.

MethodHow it worksLimitation
SQL parsingAnalyzes query text to find input and output columnsStruggles with dynamic SQL and procedural code
Query log analysisReads executed queries from the warehouse historySees only what ran in that system
Runtime instrumentationPipeline frameworks emit lineage events while runningRequires integration in each tool
Declared lineageEngineers or transformation tools define dependenciesCan drift from reality if not enforced
Manual documentationDiagrams and spreadsheets maintained by peopleOutdated quickly and hard to query
Lineage capture methods

Open standards such as OpenLineage define a common event format for jobs, runs and datasets, so orchestration tools, processing engines and catalogs can exchange lineage. Transformation frameworks that build models from SQL, such as dbt, derive a dataset dependency graph automatically from references between models.

Lineage overlaps with several neighboring ideas in data management, and the differences determine which tool or practice a team needs.

ConceptMain questionRelation to lineage
Data lineageWhere did this data come from and where does it goThe flow and dependency graph
Data provenanceWhat is the origin and history of this recordLineage plus detailed origin and custody
Data catalogWhat datasets exist and what do they meanOften displays lineage alongside descriptions
Data qualityIs this data accurate, complete and timelyLineage locates where quality problems start
Data observabilityIs the pipeline healthy right nowUses lineage to estimate the blast radius of incidents
Data lineage compared with related concepts

The terms lineage and provenance are sometimes used interchangeably. In stricter usage, provenance focuses on the origin and history of specific data items, while lineage emphasizes the transformation path between systems.

Practical uses of data lineage

Lineage pays for itself in a few recurring situations, each of which otherwise depends on the memory of individual engineers.

  • Root-cause analysis: tracing a wrong dashboard figure back to the job or source that introduced the error.
  • Impact analysis: listing every downstream model, report and export affected before a schema change.
  • Regulatory compliance: showing auditors how reported figures were derived, as banking rules such as BCBS 239 expect.
  • Privacy management: finding every copy of personal data when handling deletion requests under laws such as GDPR.
  • Cost and cleanup: identifying tables with no downstream consumers that can be retired.

Lineage is most effective when it is visible where people work: in the data catalog, in code review for pipeline changes and in incident alerts, rather than in a separate diagram that few people open.

Limitations and common mistakes

Lineage graphs are only as good as their coverage. Gaps appear wherever data passes through systems that do not report lineage, such as spreadsheets, ad hoc scripts, manual exports or external vendors.

ProblemCauseRemedy
Broken chainsUninstrumented scripts or manual stepsRoute data through instrumented pipelines
Stale diagramsLineage maintained by handCapture lineage automatically at runtime
Overwhelming graphsThousands of nodes shown at onceFilter by domain, depth and importance
False confidenceLineage mistaken for correctnessCombine lineage with quality tests
Lineage problems and remedies

Lineage shows how data flowed, not whether it is right. A complete graph of an incorrect calculation is still incorrect, so lineage works best alongside quality checks and clear definitions of each dataset.

A plain-language summary

Data lineage is a family tree for data. It shows which original sources a number came from, which steps changed it along the way and which reports or applications use it now.

When a figure in a report looks wrong, lineage lets people walk back up the tree to find where the mistake entered. When someone plans to change a source, they can walk down the tree to see who would be affected.

An example from practice

A finance team at an insurance company notices that the monthly claims ratio on its executive dashboard jumped by several points overnight. Without lineage, analysts would have to inspect dozens of pipelines by hand to find the cause.

Using column-level lineage in the data catalog, an engineer traces the ratio back through three transformation models to a source table where a recent upstream change had started recording claim amounts in cents instead of currency units. The lineage graph also shows four other reports that use the same column. The team fixes the conversion, reruns the affected models and notifies the owners of all five impacted reports within the same morning.