Bird
0
0

After running a dbt test with store_failures = true, what will the following SQL query return?

medium📝 Predict Output Q4 of 15
dbt - Advanced Testing
After running a dbt test with store_failures = true, what will the following SQL query return?
SELECT * FROM {{ ref('my_model') }}_test_unique_test__failures
AAn error because the table does not exist
BAll rows from the model regardless of test results
CAn empty table if no failures occurred
DAll rows from the model that failed the unique_test
Step-by-Step Solution
Solution:
  1. Step 1: Understand what the failure table stores

    The failure table stores rows that failed the specific test.
  2. Step 2: Interpret the query on the failure table

    Selecting from the failure table returns only failing rows, not all rows.
  3. Final Answer:

    All rows from the model that failed the unique_test -> Option D
  4. Quick Check:

    Failure table query returns failing rows only [OK]
Quick Trick: Failure tables contain only failing rows, not all data [OK]
Common Mistakes:
MISTAKES
  • Thinking it returns all rows
  • Expecting an error if failures exist
  • Assuming empty table always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes