store_failures
▶Changelog
The configured test(s) will never store their failures when dbt test --store-failures
is invoked.
Description
Optionally set a test to always or never store its failures in the database.
- If specified as
true
orfalse
, thestore_failures
config will take precedence over the presence or absence of the--store-failures
flag. - If the
store_failures
config isnone
or omitted, the resource will use the value of the--store-failures
flag.
This logic is encoded in the should_store_failures()
macro.
- Specific test
- One-off test
- Generic test block
- Project level
Configure a specific instance of a generic (schema) test:
models/<filename>.yml
version: 2models:- name: my_modelcolumns:- name: my_columntests:- unique:config:store_failures: true # always store failures- not_null:config:store_failures: fail # never store failures