impact
dbt-forge impact shows which models are affected when you change an upstream model.
Use it to understand blast radius before merging changes and to communicate risk in
pull requests.
Command
Section titled “Command”dbt-forge impact <MODEL> [--diff] [--base REF] [--pr]What it does
Section titled “What it does”The command builds a dependency graph from ref() and source() calls in your SQL,
then computes the downstream impact of one or more changed models. It shows:
- A tree of all affected downstream models, colored by depth
- Blast radius: how many models are impacted as a percentage of the total project
- Direct vs transitive impact counts
- Untested impacted models (models without any tests defined)
Arguments
Section titled “Arguments”The model name to analyze. Shows all downstream dependents as a Rich tree.
dbt-forge impact stg_ordersOptions
Section titled “Options”--diff
Section titled “--diff”Auto-detect changed models from git diff instead of specifying a model name.
Compares the current branch against the base ref.
dbt-forge impact --diffdbt-forge impact --diff --base develop--base
Section titled “--base”Base git ref for --diff comparison. Defaults to main.
dbt-forge impact --diff --base origin/mainOutput markdown formatted for pull request descriptions. Includes a summary table with blast radius, impacted model counts, and untested model warnings.
dbt-forge impact stg_orders --prdbt-forge impact --diff --prOutput
Section titled “Output”Tree view (default)
Section titled “Tree view (default)”stg_orders├── fct_orders (direct)│ └── rpt_revenue (transitive)└── fct_order_items (direct)
Blast radius: 66.7% (2 of 3 models impacted)Direct: 2 Transitive: 1 Untested: 1PR markdown (--pr)
Section titled “PR markdown (--pr)”## Impact Analysis
**Changed models:** `stg_orders`
| Metric | Value ||--------|-------|| Total impacted | 2 || Direct | 1 || Transitive | 1 || Blast radius | 66.7% |
### Untested impacted models- `rpt_revenue`Behavior and limits
Section titled “Behavior and limits”- Must run from inside an existing dbt project (walks up to find
dbt_project.yml). - Builds the graph from
ref()andsource()regex patterns in SQL files. - The
--diffflag usesgit diff --name-only {base}...HEAD -- models/to detect changed.sqlfiles. - Models not found in the graph (typos, non-existent models) produce an error message without crashing.
- Untested models are detected by scanning YAML files for
data_tests:entries. - If no model is specified and
--diffis not set, the command prints a usage error.