MetricSign
EN|NLRequest Access
Medium severityexecution

Power BI Refresh Error:
DbtRuntimeError (--retry)

What does this error mean?

The dbt --retry flag (dbt 1.6+) re-runs only models and tests that failed in the previous invocation by reading the run_results.json file. A retry failure typically means the underlying issue was not fixed between runs, or the results file is missing or stale.

Common causes

  • 1The root cause of the original failure was not fixed before --retry was invoked, causing the same models to fail again
  • 2The run_results.json file in the target/ directory is missing, stale, or from a different invocation
  • 3A --retry was issued after a dbt compile or non-run command that overwrote run_results.json without execution results
  • 4The models selected by --retry have dependencies that also failed but were not included in the retry scope
  • 5The environment or credentials changed between the original run and the retry, causing a different failure

How to fix it

  1. 1Fix the root cause of the original failure first, then run dbt retry.
  2. 2Verify run_results.json exists in target/ and corresponds to the last dbt run: cat target/run_results.json | grep elapsed_time.
  3. 3If upstream dependencies also failed, include them with: dbt retry (it automatically includes all failed nodes from the last run).
  4. 4For CI/CD pipelines, ensure the target/ directory is preserved between the initial run step and the retry step.
  5. 5Use dbt run --select result:error+ to explicitly select failed nodes and their dependents if --retry is unreliable.

Frequently asked questions

Does dbt retry also re-run tests that failed?

Yes. dbt retry re-runs all nodes (models, tests, snapshots, seeds) that had a status of error or fail in the previous invocation's run_results.json.

What is the difference between dbt retry and dbt run --select result:error+?

dbt retry uses run_results.json to determine which nodes to re-run and does not require explicitly specifying a selector. dbt run --select result:error+ is equivalent but also selects downstream dependents (+) of failed nodes, which --retry does not do automatically.

Other execution errors