Bird
0
0

What is the output of this test result if expect_column_values_to_be_unique is run on a column with duplicate values?

medium📝 Predict Output Q5 of 15
dbt - Advanced Testing
What is the output of this test result if expect_column_values_to_be_unique is run on a column with duplicate values?
ATest fails indicating duplicates found
BTest passes ignoring duplicates
CTest throws a runtime error
DTest skips duplicates silently
Step-by-Step Solution
Solution:
  1. Step 1: Understand uniqueness test behavior

    This test checks if all values in a column are unique without duplicates.
  2. Step 2: Analyze effect of duplicates

    Presence of duplicates violates uniqueness, so test fails reporting duplicates.
  3. Final Answer:

    Test fails indicating duplicates found -> Option A
  4. Quick Check:

    Duplicates present = uniqueness test fails [OK]
Quick Trick: Duplicates cause uniqueness test failure [OK]
Common Mistakes:
MISTAKES
  • Assuming duplicates pass uniqueness test
  • Expecting runtime errors instead of failure
  • Thinking duplicates are ignored

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes