Table-Level vs Column-Level Data Lineage: Which Do You Need?
Lineage comes in different resolutions. Zoom out and you see tables feeding tables. Zoom in and you see individual columns being copied, renamed and calculated. Both are useful, but for different questions, and picking the wrong one wastes time. This guide explains each level, with the same small example viewed both ways.
One example, two views
Take two short statements:
create table stg_orders as
select id as order_id, customer_id, amount as order_amount
from raw.orders;
create table fct_revenue as
select customer_id, sum(order_amount) as total_revenue
from stg_orders
group by customer_id;At the table level the lineage is: raw.orders feeds stg_orders, which feeds fct_revenue. Three boxes, two arrows.
At the column level it is more detailed: stg_orders.order_id is copied from raw.orders.id. stg_orders.order_amount is copied from raw.orders.amount. fct_revenue.total_revenue is calculated as the sum of stg_orders.order_amount. fct_revenue.customer_id is copied from stg_orders.customer_id.
Table-level lineage: the map
Table-level lineage answers "what feeds what?". It is compact enough to fit a whole project on one screen, which makes it the right level for the big picture.
When table-level is enough
- Understanding the architecture of an unfamiliar warehouse.
- Impact analysis before dropping or restructuring a table.
- Finding the order to load or migrate tables.
- Spotting tables nothing reads, and tables everything depends on.
Its limit
It cannot tell you which column of a source table matters. If a table has fifty columns and only one is used downstream, table-level lineage still shows a full dependency.
Column-level lineage: the microscope
Column-level lineage answers "where does this specific value come from?". It follows each output column to the source columns used to build it, including the calculation.
When you need column-level
- Debugging a number: a dashboard figure looks wrong and you need the exact calculation chain.
- Renaming or retyping a column: you need to know every column that depends on it.
- Sensitive data: you need to know where an email or ID column travels.
- Reviewing a change: you want to confirm a modified expression only affects what the author says.
Its limit
It is harder to get right. Reading it from SQL means following aliases, casts, CASE expressions, functions, subqueries and joins. It is best effort: dynamic SQL and macros that generate columns cannot be followed, and a SELECT * can only be expanded when the source columns are known.
How the two relate
Table-level lineage is what you get when you collapse column-level lineage. They are not competing; they are zoom levels of the same data. Start zoomed out to find the area you care about, then zoom in to the columns.
Try both on your own SQL
In the SQL lineage analyzer, the Graph tab is the table-level view and the Columns tab is the column-level view. Click a table in the graph, then open Columns and click a column to see its source columns and what depends on it. Each link is labelled copied or calculated, with the expression on hover.
For dbt projects the same two views are available in the dbt project visualizer.
A quick decision guide
- "What would break if I drop this table?" Table-level, downstream.
- "Where does this number come from?" Column-level, upstream.
- "Which tables should I migrate first?" Table-level, count of dependants.
- "Who uses this sensitive column?" Column-level, downstream.
- "Can I rename this column safely?" Column-level, downstream.
Common mistakes
Real scenarios side by side
Imagine three requests arriving in one week. A manager asks which tables would be affected if you retire an old schema. That is table-level: you need the downstream set of every table in the schema. An analyst reports that average order value fell after a release. That is column-level: you follow order_value upstream and look for the step that changed. A security reviewer asks where customer emails end up. That is column-level again, downstream from the email column.
The same graph and the same SQL answer all three, at different zoom levels. The skill is choosing the zoom that matches the question rather than looking at everything at once.
Using table-level lineage to approve a column change leads to false reassurance: the table is used, but you do not know whether the column is. Using column-level lineage for the big picture leads to drowning in detail. Match the level to the question.
To go deeper on the column level, read what column-level data lineage is and how to track column dependencies across SQL transformations.
Related tool pages
- dbt Lineage Viewer for Your SQL Models: Drop your dbt models folder and see the lineage graph from sources through staging to marts, with column links. No dbt run, no warehouse. Free, private.
- SQL Column Lineage Tool: See which source columns build every column of a view or table across many SQL files. Trace to the raw table or forward to dependants. Free, in your browser.
- SQL File Dependency Analyzer: Find out which SQL file must run before which, from the tables each file creates and reads. Get a run order, circular dependencies and tables nothing uses.
- SQL Impact Analysis: What Breaks If a Table Changes: Pick a table and see everything downstream that depends on it, and every upstream source it is built from. Works across a whole folder of SQL files, free.
- SQL File Lineage Tool: Free SQL file lineage tool: drop a folder of .sql files and see which file feeds which table, column by column. Nothing is uploaded.
- SQL Query Visualizer: Free SQL query visualizer: paste a query or drop SQL files and see tables, joins and columns as a clear diagram. Runs in your browser, no upload.
Also try
How to use the SQL Lineage Analyzer: step by step
- Decide whether your question is about tables or about a specific value.
- Start with the table-level graph to find the area.
- Open the column view for the exact columns involved.
When to use the SQL Lineage Analyzer
- Choose the right lineage level for a task
- Explain the difference to a team
- Plan a column rename safely
- Prioritise tables for migration
Example
Input: models/ folder: raw schema, staging views, marts, reports (7 .sql files)
Output: A graph of 10 tables and views, 40 column links and the order to run the files
Frequently asked questions
What is the difference between table-level and column-level lineage?
Table-level lineage shows which tables feed which tables. Column-level lineage shows which source columns build each output column, including how they are calculated.
Which do I need to debug a wrong number?
Column-level lineage, because it traces the specific column back through each calculation.
Which is easier to get automatically?
Table-level lineage is more reliable. Column-level lineage from SQL is best effort because of dynamic SQL, macros and SELECT *.
Can one tool show both?
Yes. The SQL lineage analyzer shows the table-level graph and a column-level view from the same files.
Tip: When a column change is proposed, always check the column-level downstream list, not just the table-level one.