Execute the last dbt command from the node point of failure.
Answer: retry
The --retry flag in dbt is specifically designed to re-execute a dbt command starting from the node where execution previously failed. In large DAGs, rebuilding all upstream models repeatedly is inefficient, especially when a downstream transformation is the only point of failure. dbt includes retry logic to support resiliency within orchestrated pipelines and CI/CD processes.
Using --retry allows dbt to leverage the metadata stored in the run_results.json to determine which model triggered the failure. Instead of re-running the entire DAG, dbt intelligently continues execution from the failed node, speeding up recovery and making iterative debugging far more efficient. This is particularly valuable in production pipelines where minimizing runtime is critical.
This behavior aligns with dbt’s philosophy of incremental, test-driven, modular development: failures should be isolated, reproducible, and simple to resume. By re-running only the subset of affected models, dbt improves developer productivity and orchestration reliability.
**Create a copy of an existing database object in a sandbox environment.
Answer: clone
The clone capability in dbt refers to creating a zero-copy clone (Snowflake) or snapshot-like duplicated object using the data platform's native features. This is extremely useful when developers or analysts need a safe sandbox environment to test transformations, experiment, or validate logic without affecting production data.
A clone operation duplicates the table or view metadata instantly without physically copying data, which is both cost-efficient and fast. dbt leverages this through commands such as dbt clone (dbt Cloud) or through adapters that support cloning.
Sandboxes created via cloning allow engineers to develop safely by ensuring that testing and prototyping has no impact on production tables. Because cloned objects share underlying data blocks, they are nearly storage-free unless mutated—keeping warehouse costs low.
This practice is aligned with modern analytics engineering best practices where separation of environments (dev/test/prod) is essential for governance, data quality, and reproducibility.
**Run a subset of models or tests in a sandbox environment without having to first build their upstream parents.
Answer: defer
The --defer flag allows dbt to reference already-built objects from another environment—commonly production—so that developers can run only the models they are modifying, without recreating all upstream dependencies.
When combined with --state, dbt compares the working branch’s DAG with previously generated artifacts and determines which nodes should be rebuilt. Any upstream nodes not modified in the current branch are deferred, meaning dbt will point to the existing production-built version instead of materializing them again.
This dramatically speeds up development because staging layers or intermediate models, which may take significant computation time, do not need to be rebuilt for every developer iteration.
The mechanism also prevents accidental overwrites of production objects because deferred references always point to a safe, isolated schema established by state comparison.
This concept is central to dbt’s “safe development via deferral,” enabling rapid experimentation while ensuring consistency between dev and prod environments.
**Compare nodes against a previous version of the same nodes.
Answer: state
The --state flag allows dbt to compare the current project against a previously generated manifest. This enables dbt to determine which models have changed, which tests must be re-run, and how the DAG differs between two versions.
State comparison is foundational to features such as Slim CI, deferred builds, and change-aware testing. dbt reads the state directory—typically containing artifacts from a production run—and examines differences in SQL, configurations, macros, or schema definitions.
This allows dbt to selectively build only modified nodes, increasing efficiency in CI/CD pipelines and reducing unnecessary warehouse costs. Additionally, state comparison is used for validating backward compatibility, testing versioned models, or enforcing governance rules such as model contracts.
By comparing nodes to their historical equivalents, teams can adopt modern engineering strategies such as impact analysis, regression detection, and selective deployment. This capability aligns with dbt’s focus on modular analytics engineering and automated change management.