Bird
0
0

After running a dbt test with store_failures = true, which SQL query will show the failing rows for a model named orders and test unique?

medium📝 Predict Output Q13 of 15
dbt - Advanced Testing
After running a dbt test with store_failures = true, which SQL query will show the failing rows for a model named orders and test unique?
ASELECT * FROM dbt_test__orders__unique
BSELECT * FROM orders WHERE test = 'unique' AND status = 'fail'
CSELECT * FROM dbt_failures.orders_unique
DSELECT * FROM test_failures.orders_unique
Step-by-Step Solution
Solution:
  1. Step 1: Recall naming convention for failure tables

    dbt stores failures in tables named dbt_test__model__test.
  2. Step 2: Apply model and test names

    For model 'orders' and test 'unique', the table is dbt_test__orders__unique.
  3. Final Answer:

    SELECT * FROM dbt_test__orders__unique -> Option A
  4. Quick Check:

    Failure table = dbt_test__model__test [OK]
Quick Trick: Use dbt_test__model__test naming to find failure tables [OK]
Common Mistakes:
MISTAKES
  • Assuming failure data is in original model table
  • Using incorrect table prefixes
  • Trying to filter failures in source tables

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes