Course outline

dbt / Advanced: evidence, isolation and recoverable releases / Lesson 21

Review selection and evidence before a dbt release

Inspect an upstream selection, run an approved isolated build, and interpret its artifacts and test coverage as bounded release evidence.

About 4 min readContent reviewed
On this page

Lesson goals

  • Explain the upstream graph selector.
  • Separate a read-only selection review from a build that writes relations.
  • Connect run evidence to its target, scope, and limitations.

Define the release boundary

A release decision needs an identified code revision, target environment, selected resources, and explicit validation criteria. The examples select fct_orders and its upstream dependencies using the leading plus graph operator. The model name is illustrative and must exist in the project. Selection is not the same as deployment: decide which relations may be written, who owns the target, and how downstream consumers recover from an incompatible change.

Inspect the selection first

The dbt ls command lists resources selected by the expression without building the model. Review the actual output under the intended project, profile, and state configuration, and compare it with expected dependencies. Test inclusion rules depend on the selection and dbt behavior, so inspect the selected resources rather than assuming every relevant test is included. A selection review alone does not execute SQL or validate data.

bash Review upstream selection
dbt ls --select +fct_orders

The leading plus includes upstream dependencies in the selection; inspect the actual selected resources.

Build only in an authorized target

The dbt build command can build and test selected resources in dependency order and can write to the warehouse. Run it only after confirming the target, credentials, selection, adapter, and recovery plan for the owned environment. A source freshness check is separate from build and needs its own configured invocation. Treat failures and skipped resources as evidence requiring review; a partial run is not a complete release approval.

bash Build and test the selected scope
dbt build --select +fct_orders

The build can write relations and run selected tests, so it requires an owned target and reviewed scope.

Preserve and interpret evidence

Retain the relevant manifest, run results, logs, code revision, target identity, and invocation details according to the project’s retention and access policy. These artifacts describe a particular invocation and may contain sensitive metadata, so store them appropriately. Check selected and executed nodes, status, and test outcomes rather than only the process exit code. A passing selected run does not prove unselected models or tests passed.

Verify rollback and downstream behavior

In a controlled environment compare the selected set with the intended change, introduce a known failing test, and confirm the release gate rejects the incomplete result. Verify how an earlier compatible artifact or relation can be restored without assuming a warehouse write is automatically reversible. Check downstream contracts and source freshness separately. Record which checks were not run and obtain the appropriate operational approval before a real promotion.

Common errors and fixes

A release misses a required test

Why it happens
The team assumed every test was selected by a model expression.
How to fix it
Inspect selected resources and add the required test scope explicitly.
Prevent it next time
Compare selection output with a maintained release checklist.

A build writes to the wrong schema

Why it happens
The active target or credentials were not checked.
How to fix it
Stop and follow the environment recovery procedure; verify target before rerunning.
Prevent it next time
Use isolated credentials and display safe target identity in review evidence.

A partial run is treated as complete

Why it happens
Only the command’s headline status was reviewed.
How to fix it
Inspect node statuses, failures, skips, and intended coverage.
Prevent it next time
Retain artifacts and test the release gate with a controlled failure.

2 practice exercises

1. What does the leading plus in +fct_orders request?

Show worked solution

It requests the named model and its upstream graph dependencies. Inspect the actual selected resources and test inclusion under the project’s dbt configuration rather than assuming a full-project run.

2. Why is a successful selected build not proof of source freshness?

Show worked solution

Freshness is a separate configured check, and the selected build covers only its own resources and assertions. Record the freshness result and any unselected validation independently.

Key takeaways

  • Review the graph selection and target before a writing build.
  • Tie release evidence to the exact invocation and its coverage.

Official references