Learning Objectives
By the end of this chapter, you will be able to:
- Explain what the
manifest.jsonartifact contains, when each part of the artifact is produced, and how the state comparison algorithm uses it to computestate:modifiedand its subselectors. - Run
dbt retryagainst a failed run, predict which nodes will re-execute, and recognize the cases where retry is invalidated and a freshdbt buildis required. - Compose
state:modified+,result:error+,result:fail+, andresult:skipped+selectors with the--deferand--stateflags to build slim CI Jobs, slim retry workflows, and defer-to-prod developer environments.
Executive Summary
- The
manifest.jsonartifact is dbt's pre-execution graph snapshot; the diff between a development manifest and a comparison manifest is the only input to thestate:modifiedfamily of selectors. Every selector trick in slim CI starts there. dbt retryconsultsrun_results.jsonand resumes from the failed and skipped nodes of the immediately previous invocation in the sametarget/directory. The retry contract is strict: change the project, change the manifest, and the retry is forfeit.- The slim CI pattern is a composition, not a single command.
state:modified+ --defer --state path/to/prod-manifestrebuilds only what changed and references untouched upstream relations from the production schema. Replacingstate:modified+withresult:error+converts the same flag set into a targeted retry of a failed deploy.
Assumptions
- The terms
manifest.json artifact,state:modified+ selector,defer,slim CI,dbt retry, andresult:error+ selectorare taken as defined in earlier chapters. This chapter goes deeper into the mechanics rather than reintroducing them. - All examples assume dbt 1.11 against a cloud warehouse (Snowflake, BigQuery, Databricks, Redshift, or Postgres). Adapter-specific behaviors are called out inline.
- Project paths follow the convention
analytics/for the project root,target/for the active build directory, andci_state/for a comparison manifest fetched from a production artifact store.
