Failure Points in the DAG, and dbt clone
dbt Analytics Engineering · Lesson 13 of 17 · 1:32:27
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the dbt Analytics Engineering Certification exam. In this lesson: how a failure skips its downstream nodes, managing failure points with severity and --fail-fast, dbt clone with zero-copy clones and pointer views, and when to clone or defer. Includes three original practice questions, with Orchardline Meal Kits, a fictional meal-kit company, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Twenty models that never ran
Orchardline's nightly build failed at a test on the staging orders model, and twenty models downstream never ran. Meanwhile, a developer needs the production marts in their own schema, to test a dashboard change, without rebuilding them. This lesson covers how failures travel through the DAG, managing failure points, dbt clone, and choosing between clone and defer.
How failures travel
dbt runs the DAG in order, and every node ends with a status, like success, error, or skipped. When a model fails, every node downstream of it is skipped, since its inputs were never built. With dbt build, tests sit inside the DAG: a failing test on a model blocks the models downstream, which are skipped too. Branches that do not depend on the failure keep running, so one failure does not stop the whole project. The summary at the end lists each error and the skipped nodes, and the same statuses are written to the run results file, in the target folder.
Managing failure points
Not every failure should stop the pipeline: a test with a warn severity reports the problem, but blocks nothing downstream. When an error makes the rest of the run pointless, the fail fast flag stops the whole run at the first failure, instead of building every other branch. Place tests early, on sources and staging models, so bad data is stopped before it reaches the marts that people read. And after a failure, fix the cause, then rerun only what failed or was skipped, instead of the whole project: lesson seventeen covers dbt retry.
dbt clone
dbt clone copies selected nodes from a saved state, usually production, into your target schema. On warehouses that support zero copy cloning, like Snowflake, Databricks, or BigQuery, a table is cloned almost instantly, since only its metadata is copied. Elsewhere, or for nodes that are not tables, dbt creates a pointer view instead, which selects everything from the production object. Relations that already exist in your target are kept, unless you add the full refresh flag, and more threads speed it up, since clone statements are independent. The production state is passed with the state flag, which points to its artifacts.
Clone or defer
Deferral, covered in lesson seventeen, creates nothing: unchanged models are read straight from production. Clone creates real objects in your schema, so tools outside dbt, like a BI dashboard, can read them. Cloned objects are a safe sandbox: you can change them without touching production, but they are a point in time copy, which drifts as production moves on. Clone also helps CI with incremental models: cloning them first avoids a costly full build of each modified incremental model. So defer to save time inside dbt, and clone when you need real objects, for a BI tool, a sandbox, or incremental models in CI.
Recap
Let's recap. When a node fails, everything downstream of it is skipped, while independent branches keep running. With dbt build, a failing test blocks the models downstream, unless its severity is warn. The fail fast flag stops the whole run at the first failure. dbt clone copies production objects into your schema, with zero copy cloning where the warehouse supports it, or pointer views elsewhere. And defer reads production inside dbt, while clone creates real objects, for BI tools, sandboxes, and incremental models in CI.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
During a dbt build, a model in the middle of the DAG fails, and no flag is set. What happens to the models in other branches, which do not depend on it?
- They keep running, and build as they usually do
- They stop at once, since dbt fails fast by default
- They are skipped, like every node after the failure
- They run only after the failed model is fixed
Show the answer
They keep running, and build as they usually do
A failure only skips the nodes downstream of it, so independent branches keep running, and build as usual. “They stop at once, since dbt fails fast by default” is wrong, since fail fast is off unless you turn it on. “They are skipped, like every node after the failure” is wrong, since only the nodes that depend on the failed model are skipped. And “They run only after the failed model is fixed” is wrong, since dbt never waits for a fix during a run.
A data quality test on the delivery events source fails now and then, for a known reason. The team does not want it to stop the marts downstream. What should they change?
- Run the nightly job with the --fail-fast flag
- Move the test onto the last model of the DAG
- Read the raw table directly, without source()
- Set the severity of the test to warn
Show the answer
Set the severity of the test to warn
With a warn severity, the failing test is still reported, but no longer blocks the models downstream. “Run the nightly job with the --fail-fast flag” is wrong, since fail fast stops the whole run at the first failure. “Move the test onto the last model of the DAG” would only check the data too late, after the marts are built. And “Read the raw table directly, without source()” is wrong, since dropping the source function loses the lineage, and the freshness checks.
A developer wants to test a dashboard change against the production marts, from the BI tool, without rebuilding the marts. What fits best?
- Defer to production for the marts
- Clone the production marts into a development schema
- Run dbt build with --full-refresh in development
- Point the dashboard at production, and edit the marts there
Show the answer
Clone the production marts into a development schema
Clone creates real objects in the development schema, which the BI tool can read, without rebuilding anything. “Defer to production for the marts” is wrong, since deferral creates no objects, and only works inside dbt. “Run dbt build with --full-refresh in development” is wrong, since a full refresh rebuilds the marts, which costs time and compute. And “Point the dashboard at production, and edit the marts there” is wrong, since editing the production marts puts every report at risk.