MetricSign
EN|NLRequest Access
High severitydbt

Power BI Refresh Error:
dbt Exit Code 1

What does this error mean?

The dbt process exited with code 1 — a recoverable failure where one or more models failed to run, tests failed, or there was a compilation error. Exit code 1 means dbt ran but could not complete successfully; it does not indicate a dbt installation or configuration problem.

Common causes

  • 1One or more dbt models raised a database error during execution
  • 2One or more dbt tests failed and the job is configured to error on test failure
  • 3An upstream model failed, causing downstream models to be skipped

How to fix it

  1. 1Check the dbt run output for the specific models or tests that failed.
  2. 2Review the database error message returned for each failed model.
  3. 3Run `dbt run --select <failed_model>` to rerun only the failing model with more verbose output.
  4. 4Check if any upstream models failed, which would cause downstream models to be skipped with status "skipped".

Frequently asked questions

What is the difference between dbt exit code 1 and exit code 2?

Exit code 1 means one or more models or tests failed — the run structure was valid. Exit code 2 means dbt itself failed before completing. Code 1 is a data failure; code 2 is a process failure.

How do I find which models failed with exit code 1?

In dbt Cloud, the job run detail page shows each model's status (pass/fail/skip). Failed models show the SQL error from the warehouse — check the compiled SQL and run it manually to debug.

Can exit code 1 be caused by failed dbt tests rather than model failures?

Yes — if a test fails, the job exits with code 1. The dbt Cloud run log distinguishes model from test failures. Configure test severity (warn vs. error) to control which failures trigger exit code 1.

Official documentation: https://docs.getdbt.com/guides/debug-errors

Other dbt errors