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