Skip to content
mentoor

Topic 4 of 5 · 5 min read

Tracing lineage from source to dashboard

Goal: Use a lineage graph to list every downstream report affected by a column change.

Lineage is a map of where each table and column comes from and what is built on it, and you use it in two directions: downstream before you change something, upstream when a number looks wrong. Without the map, both jobs are done by guessing and searching code.

Check yourself · 1 of 3

You plan to rename a column. What does lineage tell you before you do it?

Choose one answer

Why it matters

Two questions come up every week. "If I change this column, what breaks?" and "this dashboard number is wrong, where did it come from?" A lineage graph answers both in minutes. Without one, the first is answered by shipping and waiting for complaints, and the second by reading transformation code across five repositories.

Where lineage comes from

  • dbt. Each ref() and source() call records a dependency, so dbt docs shows a graph of models, and dbt Catalog (called dbt Explorer until 2025) adds column-level lineage on paid plans.
  • OpenLineage. An open standard for events that jobs emit when they run: which datasets they read and wrote. Orchestrators and engines such as Airflow and Spark can send these events to a backend, so lineage also covers jobs outside dbt.
  • SQL parsing. Some catalogs read query text to infer column lineage. It is useful and can miss dynamic SQL, so treat gaps as unknown, not as proof of no dependency.

Lineage has to include the last mile: dashboards, exports, reverse-ETL jobs and the agents or notebooks that query the table. If the graph stops at the warehouse, the most visible consumers are missing.

Impact analysis before a change

  1. Find the column in the graph.
  2. List every downstream table, then every dashboard, export and agent that reads them.
  3. Check each consumer's owner from the ownership entries.
  4. Warn them, or version the change.

Tracing a wrong number upstream

Start at the dashboard tile, find its model, then walk back one hop at a time. At each hop compare the number with the one upstream. The first hop where it changes is where to look: a join, a filter or a transformation.

Before and after

Weak: "I'll rename discount_pct and see what fails." Fixed: open the lineage for discount_pct, find it feeds orders_daily, margin_weekly, the finance dashboard and a pricing notebook, message those four owners, and ship with the old name kept for two weeks.

What goes wrong

  • Trusting an incomplete graph. Manual scripts, notebooks and ad-hoc queries often do not appear. Search query logs for the column name too.
  • Table lineage only. A table can depend on a source overall but use only one column. Column lineage narrows the blast radius.
  • Stale lineage. If it is built once a quarter, it describes last quarter's pipeline.

Examples

Impact list for a column rename

The column orders_daily.discount_pct feeds two models, a finance dashboard and a pricing notebook found in query logs but missing from the graph. Four owners are warned. The rename ships with the old column kept for two weeks.

Tracing a wrong tile

The 'Active users' tile shows 12% fewer users than last week. Upstream, sessions_clean matches the raw events, but users_daily has fewer rows. A new join in that model uses an inner join to a table with missing rows. The fix is one line at that hop.

Key points

  • Lineage answers two questions: what breaks if I change this, and where did this number come from.
  • dbt builds table lineage from ref and source calls, and OpenLineage collects run events from jobs outside dbt.
  • A useful graph reaches dashboards, exports and agents, not only warehouse tables.
  • Before a change, list every downstream consumer and tell its owner.
  • To trace a wrong number, walk upstream one hop at a time and find the first hop where it changes.

Common mistakes

  • Assuming the lineage graph is complete when notebooks and ad-hoc queries are not tracked.
  • Checking only table-level lineage when a single column changed.
  • Stopping the graph at the warehouse and missing dashboards and agents.
  • Running impact analysis after the change instead of before.

Check yourself · 2 of 3

A dashboard number is wrong. What is the best way to use lineage?

Choose one answer

Check yourself · 3 of 3

What does OpenLineage provide?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic