Bird
0
0

Given this test in schema.yml:

medium📝 Predict Output Q4 of 15
dbt - Advanced Testing
Given this test in schema.yml:
tests:
- expect_column_values_to_be_between:
column: age
min_value: 18
max_value: 65

What will happen if the column age contains a value of 70?
AThe test will fail because 70 is outside the allowed range
BThe test will pass because 70 is a valid integer
CThe test will error due to syntax issues
DThe test will ignore values above 65
Step-by-Step Solution
Solution:
  1. Step 1: Understand the test condition

    The test expects all age values to be between 18 and 65 inclusive.
  2. Step 2: Check value 70 against range

    Since 70 is greater than 65, it violates the test condition, causing failure.
  3. Final Answer:

    The test will fail because 70 is outside the allowed range -> Option A
  4. Quick Check:

    Value outside range = test fails [OK]
Quick Trick: Values outside min/max cause test failure [OK]
Common Mistakes:
MISTAKES
  • Assuming any integer passes
  • Thinking test ignores out-of-range values
  • Confusing syntax error with test failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes