Find model impact
When to use this
Use this recipe before changing a dbt model to understand which downstream models and tests depend on it. This helps you assess the blast radius of a change before it reaches CI or production.
Inputs required
manifest.json(run results not required for lineage analysis)- Optional:
run_results.json(adds execution status to downstream nodes)
Recommended interface
| Interface | Use when |
|---|---|
| CLI | You need dependency lists as JSON for scripting or pre-change review |
| Web | You want to visually explore the lineage graph around a model |
| MCP | A coding agent needs to reason about impact scope and suggest test coverage |
Step 1: Find the model by name
If you only have a partial name:
npx @dbt-tools/cli discover --dbt-target ./target "orders" --limit 5 --jsonNote the unique_id from the output. It will look like model.my_project.orders.
Step 2: Intent-shaped impact
npx @dbt-tools/cli impact model.my_project.orders --dbt-target ./target --jsonimpact returns upstream/downstream counts and notable dependents. When DBT_TOOLS_WEB_BASE_URL is set, JSON includes web_url / review_url pointing at Inventory with assetTab=lineage. See Deep links.
Step 3: Inspect the full downstream graph
npx @dbt-tools/cli deps model.my_project.orders --dbt-target ./target --direction downstream --jsonThe output lists all models, tests, snapshots, and exposures that depend—directly or transitively—on the target model.
Step 4: Inspect upstream dependencies
npx @dbt-tools/cli deps model.my_project.orders --dbt-target ./target --direction upstream --jsonUpstream dependencies show what the model reads. If you are changing a source, this helps you find all models that consume it.
Step 5: Explain the model
npx @dbt-tools/cli explain model.my_project.orders --dbt-target ./target --jsonThe explain output includes column definitions, tests associated with the model, and configuration metadata. Check whether there are downstream exposures or BI tools connected to this model.
Step 6 (optional): Open in Web for visual lineage
npx @dbt-tools/cli impact model.my_project.orders --dbt-target ./target --json \
| jq -r '.web_url'Or start the UI and open Inventory → the model → Lineage:
npx @dbt-tools/web --dbt-target ./targetReading the output
| Field in deps output | What it means |
|---|---|
| Direct downstream nodes | Models or tests that directly reference this model |
| Transitive downstream nodes | Models that depend on direct dependents |
| Exposures | BI reports, dashboards, or other downstream consumers declared in exposure blocks |
| Tests | Tests that run against this model or its columns |
Common questions
"What breaks if I rename this model?" Run impact for counts, then deps --direction downstream and count the transitive dependents. Any model in the list will break if the source is renamed without also updating the ref() call.
"Is this model used by anyone?" If deps --direction downstream returns an empty list, the model has no declared dependents in the project. It may still be referenced by other tools or by external consumers not captured in the manifest.
"What sources does this model read?" Run deps --direction upstream. Source nodes appear with unique_id values like source.my_project.raw.orders.
Related
- Debug a failed run — combine impact analysis with failure context
- Open CLI result in Web — move from JSON to browser for visual lineage
- CLI cheatsheet
- Deep links — link from CLI JSON to specific Web views