Data Engineering  /  Data Modeling

๐Ÿงฑ Data Modeling 20 guides ยท updated 2026

From ER diagrams to data mesh โ€” relational, dimensional, NoSQL, and governance-driven modeling for building data platforms people can trust.

Data Lineage: Tracing Where Data Comes From and What Breaks If You Change It

Two questions haunt every data platform. The first arrives with an angry Slack message: โ€œthe numbers on this dashboard look wrong โ€” where does this data actually come from?โ€ The second arrives before a deploy: โ€œif I change this column, what breaks?โ€ Both are the same question asked in opposite directions, and answering them from memory stops working at roughly the twentieth table. Data lineage โ€” the recorded graph of how data flows and transforms from source to consumption โ€” is the infrastructure that answers them at any scale.

This post covers what lineage is (and its levels of resolution), how itโ€™s actually captured, the four use cases that justify the investment, and why lineage efforts fail when theyโ€™re attempted as documentation instead of automation.

What Lineage Is: The Dependency Graph of Your Data

Lineage records, for every data asset, its upstream inputs and downstream consumers, forming a directed graph across the whole platform:

orders DB

(source)

raw.orders

(landed via CDC)

payments DB

raw.payments

stg_orders

stg_payments

fct_revenue

๐Ÿ“Š Exec revenue

dashboard

๐Ÿค– Churn model

features

Resolution matters enormously, and itโ€™s the main axis along which lineage systems differ:

A dimension often forgotten: lineage has a time axis. The graph as it exists today doesnโ€™t explain last quarterโ€™s numbers if the pipeline changed in between. Mature systems version their lineage; at minimum, know that โ€œcurrent lineageโ€ is what you have.

How Lineage Is Captured (Ranked by Trustworthiness)

1. Parsed from transformation code โ€” the gold standard. If your transformations are SQL (dbt, warehouse pipelines), lineage is derivable: parse every SELECT, and the reads/writes fall out โ€” at column level, with effort. dbtโ€™s ref() convention made table-level lineage a free, always-correct byproduct of just building models, which is quietly one of the biggest reasons for its adoption. Warehouse-native metadata (access history in Snowflake, audit logs in BigQuery) extends this to observed lineage โ€” what queries actually read and wrote, whether or not they came from your nice tooling.

2. Emitted by pipelines. Where logic isnโ€™t SQL (Spark jobs, Python), the job itself reports โ€œI read X, wrote Yโ€ via instrumentation. OpenLineage is the open standard here โ€” emitters exist for Spark, Airflow, Flink and friends, so heterogeneous stacks can feed one graph rather than one graph per vendor.

3. Declared by humans โ€” the fallback. Manually drawn lineage for the pieces automation canโ€™t see (that cron job from 2019, the vendor black box). Necessary in corners; fatal as a strategy. Hand-maintained lineage is wrong within a quarter, and โ€” worse than missing โ€” quietly wrong. The operating rule: automate coverage of the 95%, manually annotate the stubborn 5%, and mark the manual parts as such.

The Four Use Cases That Pay for It

Impact analysis (looking downstream). Before changing stg_orders.amount, one query returns every downstream model, dashboard, and ML feature that touches it โ€” and, joined with ownership metadata, who to warn. This is the difference between a schema change shipped with a checklist and one shipped with hope. Wired into CI, it becomes preventive: a PR that alters a column gets an automated comment listing blast radius, before merge, every time. (This is โ€œactive metadataโ€ from the data-fabric post, in its most concretely useful form.)

Root-cause analysis (looking upstream). The dashboard is wrong; walk upstream through four hops; find the source whose freshness check failed at 3 a.m. What was an afternoon of ad-hoc archaeology becomes a two-minute traversal. Data-observability tools lean on lineage for exactly this: an anomaly in one table plus lineage equals a correlated incident instead of forty independent alerts.

Compliance and audit. โ€œProve where this regulated figure comes fromโ€ (BCBS 239 in banking demands precisely this) and โ€œfind every asset derived from personal dataโ€ (GDPR erasure and processing records) are lineage queries. Classification tags (see the governance post) propagate along lineage edges โ€” tag PII at the source and the graph tells you everywhere it flowed, including that forgotten export.

Trust and debugging avoidance. The humblest and maybe highest-frequency use: an analyst deciding between fct_revenue and revenue_final_v3 opens each oneโ€™s lineage; one traces cleanly to sources and refreshed this morning, the other dead-ends in a dropped table. No meeting required.

Why Lineage Projects Fail

The failure mode is consistent enough to name: lineage attempted as a documentation project. A team is assigned to โ€œmap the data flows,โ€ produces a beautiful diagram over a quarter, and the diagram is a lie by the next quarter because nothing updates it. The fixes are the same lessons as the metadata post in this series, applied here:

Getting Started, Concretely

  1. If youโ€™re on dbt: you already have table-level lineage โ€” expose it beyond the docs site by loading it into your catalog. Cost: near zero.
  2. Turn on warehouse access-history/audit-log parsing (native features or a catalogโ€™s integration) to catch lineage from tools that bypass dbt.
  3. Instrument the non-SQL pipelines with OpenLineage emitters.
  4. Integrate BI: dashboards-to-tables is the hop that makes impact analysis meaningful to the business.
  5. Wire the first automation: schema-change PRs get an auto-generated downstream-impact comment. This single workflow converts lineage from a diagram people admire into a tool people rely on.

Lineage is ultimately the platformโ€™s memory of its own construction. Every pipeline you ship encodes decisions โ€” this joins that, this filters those โ€” and without lineage, that knowledge lives only in the heads of whoever shipped it, depreciating with every departure. Captured automatically and joined to ownership, it becomes the thing every mature data organization eventually realizes it canโ€™t operate without: the map thatโ€™s always as current as the territory.