# Column-Level Data Lineage for Analytics Engineers (Straight From Your dbt Models)

> How analytics engineers can trace dbt columns from marts back to sources using only model SQL. Practical workflow for debugging, renames and review. Free.

Page: https://datautility.in/blog/dbt-column-level-lineage-from-your-sql-models
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-17 · Analyze & protect · column level lineage analytics engineers, dbt column level lineage, dbt column lineage, trace column in dbt, dbt model columns, analytics engineering lineage

As an analytics engineer you are asked the same two questions all week: why is this number what it is, and what happens if I change that column? Model-level lineage tells you which models are involved. Column-level lineage tells you which columns, and what happened to them. Here is a workflow for using it in dbt, without a warehouse connection.

Open the tool: [dbt Column Lineage Tool](https://datautility.in/dbt-column-level-lineage)

## Why model lineage is not enough

In dbt, model-level lineage is built in. It tells you that fct_orders depends on stg_orders and stg_payments. It does not tell you that total_revenue is a sum of a column that came from payments.amount after a currency conversion in an intermediate model.

That level of detail decides whether a debugging session takes five minutes or two hours.

## What you need

Only your models folder. A tool that reads the SQL of each model can work out column links without running dbt or connecting to the warehouse. The [dbt column lineage tool](https://datautility.in/dbt-column-level-lineage) does this in your browser: drop the folder, open the Columns tab and pick a model.

## Workflow 1: debug a wrong number

A stakeholder says monthly revenue looks too low.

### Step 1: find the column

Open the mart that feeds the report. Click the revenue column.

### Step 2: walk upstream

The left side shows the columns it is built from, hop by hop. Each link is marked copied or calculated, and you can hover to read the expression.

### Step 3: look for the changing step

Chains of copies are rarely the problem. Look for the first calculated link: a filter, a join that multiplies rows, a CASE that drops a category or a cast that rounds. Fix it there.

```sql
-- the cause is often one line in staging
select id as order_id, amount as order_amount
from {{ source('shop', 'orders') }}
where status = 'completed'   -- drops refunds and pending orders
```

## Workflow 2: rename a column safely

You want to rename customer_id to account_id in a staging model.

- Open the Columns tab for that staging model and click customer_id.

- Read the right-hand list: every column in other models built from it, directly or through other models.

- Change exactly those, and nothing else.

Searching the repository for customer_id would also return unrelated columns that share the name. Lineage returns only the dependants.

## Workflow 3: review a pull request

A pull request changes a calculation in an intermediate model. Drop the branch's models into the visualizer and click the changed column. The right-hand list tells you which marts it reaches. If a mart appears that the description does not mention, ask about it in the review.

## Workflow 4: document a metric

Ask "what does this metric include?" for your top five metrics and keep the chain as documentation. Because the chain is generated from the code, you can regenerate it whenever the models change instead of maintaining a diagram.

## What it can and cannot see

Column links are read from the SQL, following aliases, casts, CASE expressions, functions, CTEs and subqueries. It is best effort. Be aware of these limits:

- A SELECT * is expanded only when the source columns are defined in your files. In dbt this often means columns from a source() call show as unknown unless you provide a CREATE TABLE for them.

- Macros and Jinja loops that generate columns cannot be followed, because the final SQL is not in the file.

- Descriptions and tests from YAML are not read.

The Issues tab lists statements that could not be read, so you know which models need a manual check.

## Making your models easier to trace

- Prefer explicit column lists over SELECT * in staging models.

- Keep calculations in intermediate models with clear names rather than hiding them in marts.

- Avoid generating columns with macros unless you need to.

## Where this fits

dbt's own tooling covers documentation and model lineage, and its hosted offering covers column lineage on certain plans. A browser-based column tracer fills the gap when you want an answer now, with no setup. See [the best free dbt lineage tools](https://datautility.in/blog/best-free-dbt-lineage-tools-for-data-engineers) for how the options compare, and [what column-level data lineage is](https://datautility.in/blog/what-is-column-level-data-lineage-with-sql-examples) for the concept.

## How to use the dbt Column Lineage Tool: step by step

1. Drop your dbt models folder into the column lineage tool.
2. Open Columns, choose a model and click a column.
3. Read the source columns on the left and the dependants on the right.

## When to use the dbt Column Lineage Tool

- Debug a metric back to its source column
- Rename a staging column safely
- Review a changed calculation
- Document how a metric is built

## Example

Input:

```
models/marts/fct_orders.sql with order_total = quantity * unit_price
```

Output:

```
order_total ← stg_order_items.quantity, stg_order_items.unit_price ← source.order_items
```

## Frequently asked questions

### How do I see column-level lineage in dbt?
Drop your models folder into a tool that reads SQL, open the Columns tab and click a column. It lists the source columns and the dependent columns.

### Do I need a warehouse connection?
No. The lineage is read from the model SQL, so no warehouse, manifest or credentials are needed.

### Why is a column missing from the lineage?
It may be created by a macro or Jinja loop, or come from a SELECT * on a table not defined in your files. Such cases are listed under Issues.

### Can I use it to plan a column rename?
Yes. Click the column and read the list of dependants. Those are the columns you need to update.

Tip: Hover a link to read the exact expression. The first calculated link in a chain is usually where a value changes meaning.

## Related tool pages

- [SQL Lineage Analyzer for a Folder of SQL Files](https://datautility.in/sql-lineage-analyzer): Upload a folder of SQL files or a dbt project and get table and column lineage across every file, a run order and impact analysis. Free, runs in your browser.
- [dbt Lineage Viewer for Your SQL Models](https://datautility.in/dbt-lineage-viewer): 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](https://datautility.in/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](https://datautility.in/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](https://datautility.in/sql-impact-analysis): 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](https://datautility.in/sql-file-lineage): Free SQL file lineage tool: drop a folder of .sql files and see which file feeds which table, column by column. Nothing is uploaded.

## Also try

- [Track column dependencies](https://datautility.in/blog/track-column-dependencies-across-sql-transformations)
- [SQL column impact analysis](https://datautility.in/blog/sql-column-impact-analysis)
- [SQL lineage vs dbt lineage](https://datautility.in/blog/sql-lineage-vs-dbt-lineage)

## More guides

- [Data Profiler: Check Data Quality Before You Use It](https://datautility.in/blog/data-profiler-check-data-quality)
- [Compare Two CSV or Excel Files: Find Added, Removed and Changed Rows](https://datautility.in/blog/compare-two-csv-files-find-differences)
- [Data Masking: Hide Emails, Phones and Names Before Sharing](https://datautility.in/blog/data-masking-hide-emails-phones-pii)
