hi! i have a question about storing test failures....
# community-support
c
hi! i have a question about storing test failures. dbt has the
store_failures
config option, which I have set to true for two separate tests on an employee_id column:
not_null
and
unique
. when i run
dbt build --select model_name
, there are 1 and 199,739 failed records, respectively. the failures are correctly being stored but not with elementary. when i check the elementary
test_result_rows
table, i see 1/1 of the the
not_null
records but only 5/199,739. is there some kind of limitation where elementary only stores a few of the failures and not all of them?
a
Hey @CJ Johanson Elementary only stores a sample of the failed records and the default value is 5. You can control it with the variable test_sample_row_count.
c
awesome, thank you so much!
a
And you can copy the SQL query from the report to retrieve all failed records (if you decide not to store them with dbt store failures)
c
oh thats a good idea. i incorrectly thought it was necessary to use dbt's
store_failures
in order for elementary to have access to said records
a
Elementary doesn't need dbt to store failures. You can disable it and use the query from the report.
c
thats exactly what ill do. thanks again!