CLI tool for navigating and understanding dbt projects
Project description
dbt-lens
CLI tool for navigating and understanding dbt projects. Read your manifest.json and get instant answers about impact, lineage, and project health — no warehouse connection required.
Install
pip install dbt-lens
Quick Start
# Generate your manifest first
dbt compile
# See what breaks if you change a model
dbt-lens impact stg_orders
# Trace a column back to its source
dbt-lens trace mrt_daily_revenue.gross_revenue
# Git-aware blast radius
dbt-lens diff
# Project health report
dbt-lens health
Commands
Navigation
| Command | Description |
|---|---|
impact <model> |
Show downstream models/tests affected by a change |
upstream <model> |
Trace a model back to its sources |
find <query> |
Fuzzy search across models, columns, macros |
Column Lineage
| Command | Description |
|---|---|
trace <model.column> |
Trace a column's lineage back through upstream models to its source |
explain <model> |
Auto-generated model summary: sources, joins, filters, aggregations |
Git Integration
| Command | Description |
|---|---|
diff |
Git-aware impact analysis — changed files → downstream blast radius → dbt selector |
macro-impact <macro> |
Show all models affected by a macro, including transitive macro chains |
Project Health
| Command | Description |
|---|---|
health |
Test coverage, documentation gaps, model size warnings, source freshness |
Global Options
| Option | Default | Description |
|---|---|---|
--manifest PATH |
target/manifest.json |
Path to manifest.json |
--format terminal|json |
terminal |
Output format |
--dialect DIALECT |
auto-detect | sqlglot dialect override (bigquery, snowflake, postgres) |
Examples
Impact analysis
$ dbt-lens impact stg_orders
stg_orders (staging | view)
├── int_orders_enriched (intermediate | view)
│ └── dim_order (dimension | table) ← 2 tests
│ └── mrt_order_summary (mart | table) ← 1 test
└── ...
5 models affected │ 3 tests │ 3 layers deep
Column trace
$ dbt-lens trace mrt_order_summary.customer_name
mrt_order_summary.customer_name
<- dim_customer.name
<- stg_customers.name
<- customers.name
Diff
$ dbt-lens diff
Modified files (vs main):
models/staging/stg_orders.sql
Blast radius:
stg_orders → 5 downstream models, 3 tests
Total: 5 unique models affected
Suggested selector:
dbt build -s stg_orders+
Macro impact
$ dbt-lens macro-impact filter_test_emails
Macro chain:
filter_test_emails
└── filter_and_validate_emails (depends on filter_test_emails)
Models using this chain (direct + transitive): 2
dimension: 2
Requirements
- Python >= 3.9
- dbt-core >= 1.4 (manifest v7+)
- No warehouse connection needed — reads
manifest.jsononly
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_lens-0.3.0.tar.gz.
File metadata
- Download URL: dbt_lens-0.3.0.tar.gz
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfd090052e2b64c0015c668b646aebfad83468778e15924c034b750e0648e6cb
|
|
| MD5 |
e5610effec2e8a53ce74b097f2d8ca5c
|
|
| BLAKE2b-256 |
4d620d1bd4e9598de9d89d94075ea6adc9146ad4358af772836742bfa4de3da7
|
Provenance
The following attestation bundles were made for dbt_lens-0.3.0.tar.gz:
Publisher:
publish.yml on ishanyash/dbt-lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_lens-0.3.0.tar.gz -
Subject digest:
cfd090052e2b64c0015c668b646aebfad83468778e15924c034b750e0648e6cb - Sigstore transparency entry: 1116196466
- Sigstore integration time:
-
Permalink:
ishanyash/dbt-lens@eb419e2ac68badecac71f292efd3a86490bbad5b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ishanyash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@eb419e2ac68badecac71f292efd3a86490bbad5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dbt_lens-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dbt_lens-0.3.0-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
903eebc0d83c0810cbb605048b17dd23cab69795ba2b591e203a7879bfbbab17
|
|
| MD5 |
509afb27f0232868664fe2cbe8fbc32d
|
|
| BLAKE2b-256 |
2d03c1bc9b8d2a7f6e9165e60d4b1e2aaed5c15748323f167bb37d2f79f90498
|
Provenance
The following attestation bundles were made for dbt_lens-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on ishanyash/dbt-lens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_lens-0.3.0-py3-none-any.whl -
Subject digest:
903eebc0d83c0810cbb605048b17dd23cab69795ba2b591e203a7879bfbbab17 - Sigstore transparency entry: 1116196473
- Sigstore integration time:
-
Permalink:
ishanyash/dbt-lens@eb419e2ac68badecac71f292efd3a86490bbad5b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ishanyash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@eb419e2ac68badecac71f292efd3a86490bbad5b -
Trigger Event:
push
-
Statement type: