Bird
0
0

You wrote this test in your schema.yml:

medium📝 Debug Q14 of 15
dbt - Advanced Testing
You wrote this test in your schema.yml:
tests:
- expect_column_values_to_be_unique_or_nulls

But dbt throws an error when running tests. What is the likely cause?
AThe test name is incorrect; it should be expect_column_values_to_be_unique_or_nulls
BThe test name is incorrect; it should be expect_column_values_to_be_unique_or_null
CThe test requires parameters min_value and max_value
DThe test cannot be used in schema.yml files
Step-by-Step Solution
Solution:
  1. Step 1: Check test name spelling

    The correct test name is expect_column_values_to_be_unique_or_null without the trailing 's'.
  2. Step 2: Understand test usage

    This test does not require parameters and is valid in schema.yml files.
  3. Final Answer:

    The test name is incorrect; it should be expect_column_values_to_be_unique_or_null -> Option B
  4. Quick Check:

    Exact test names matter for dbt-expectations [OK]
Quick Trick: Check exact test function names for typos [OK]
Common Mistakes:
MISTAKES
  • Adding extra characters to test names
  • Assuming parameters are needed for all tests
  • Thinking some tests can't be in schema.yml

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes