Skip to main content


The configured test(s) will store their failures when dbt test --store-failures is invoked. If you set this configuration as false but store_failures_as is configured, it will be overridden.


Optionally set a test to always or never store its failures in the database.

  • If specified as true or false, the store_failures config will take precedence over the presence or absence of the --store-failures flag.
  • If the store_failures config is none or omitted, the resource will use the value of the --store-failures flag.
  • When true, store_failures saves all the record(s) that failed the test only if limit is not set or if there are fewer records than the limit. store_failures are saved in a new table with the name of the test.
  • A test's results will always replace previous failures for the same test, even if that test results in no failures.
  • By default, store_failures uses a schema named dbt_test__audit, but, you can configure the schema to a different value.

This logic is encoded in the should_store_failures() macro.

Configure a specific instance of a generic (schema) test:

version: 2

- name: my_model
- name: my_column
- unique:
store_failures: true # always store failures
- not_null:
store_failures: false # never store failures