dbt Lineage
Visualize your dbt model DAG with interactive upstream/downstream highlighting.
Page Overview
dbt Lineage
Visualize dbt model DAG with interactive graph and filtering options

How to Use
Features
DAG Visualization
Interactive graph showing model relationships
Layer Colors
Color-coded by layer type for easy identification
Model Search
Find specific models by name
Lineage Tracing
Highlight upstream and downstream dependencies
Layer Organization
dbt models are organized into layers, each with its own color:
| Layer | Color | Description |
|---|---|---|
| Staging | ✓staging | Raw data transformations |
| Intermediate | ℹintermediate | Business logic layers |
| Mart | ⚠mart | Final analytical models |
| Other | ○other | Uncategorized models |
DAG Navigation
Filtering by Layer
Use the layer selector to focus on specific model types:
- All - Show entire DAG
- Staging - Only staging models (
stg_*) - Intermediate - Only intermediate models (
int_*) - Mart - Only mart models (
fct_*,dim_*)
Selecting Models
Click a model node to:
- Highlight upstream - Show all models this one depends on
- Highlight downstream - Show all models that depend on this one
- View details - Model name, layer, materialization
Model Search
Use the search box to find models:
- Type part of a model name
- Results update as you type
- Click a result to center on that model
Model Details
When you select a model, the sidebar shows:
| Property | Example |
|---|---|
| Name | fct_waste_collections |
| Layer | Mart |
| Materialization | Table |
| Upstream Count | 3 models |
| Downstream Count | 5 models |
dbt Cloud Integration
Lineage data is fetched from dbt Cloud. Configure access with:
# Option 1: Environment variables
DBT_CLOUD_ACCOUNT_ID=12345
DBT_CLOUD_API_KEY=dbtc_xxxxxxxxxxxx
DBT_CLOUD_JOB_ID=67890
# Option 2: ~/.dbt/dbt_cloud.yml
account_id: 12345
api_key: dbtc_xxxxxxxxxxxx
job_id: 67890
Lineage data is cached for 10 minutes. Click Refresh to fetch the latest manifest from dbt Cloud.
Understanding the DAG
Upstream Dependencies
Models shown above and to the left of your selected model. These are the inputs required to build your model.
stg_customers → int_customer_orders → fct_orders
↑
upstream selected
Downstream Consumers
Models shown below and to the right. These models depend on your selected model.
fct_orders → rpt_daily_orders
↑ ↑
selected downstream
Troubleshooting
"dbt Cloud not configured"
- Set
DBT_CLOUD_ACCOUNT_IDandDBT_CLOUD_API_KEY - Or create
~/.dbt/dbt_cloud.ymlwith credentials - Ensure the job has run at least once to generate a manifest
"No models found"
- Verify the job ID is correct
- Check that the dbt job has completed successfully
- Ensure the manifest artifact is available
Graph not rendering
- Install the
streamlit-agraphpackage - Check browser console for JavaScript errors
- Try refreshing the page