Bird
0
0

A dbt test is defined as:

medium📝 Debug Q7 of 15
dbt - Advanced Testing
A dbt test is defined as:
columns:
- name: signup_date
tests:
- not_null

After running tests, you find some rows with null signup_date values. What should you do to fix the test failure?
AUpdate the source data to remove null signup_date values
BRemove the not_null test from schema.yml
CChange the test to unique instead of not_null
DIgnore the test failure as it is expected
Step-by-Step Solution
Solution:
  1. Step 1: Understand what not_null test checks

    It ensures no null values exist in the column.
  2. Step 2: Fix the root cause of failure

    Null values in source data must be corrected to pass the test.
  3. Final Answer:

    Update the source data to remove null signup_date values -> Option A
  4. Quick Check:

    Fix nulls in data to pass not_null test [OK]
Quick Trick: Fix data issues to pass not_null tests [OK]
Common Mistakes:
MISTAKES
  • Removing tests instead of fixing data
  • Changing test type without reason
  • Ignoring test failures

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes