Bird
0
0

This test configuration causes dbt to fail:

medium📝 Debug Q7 of 15
dbt - Advanced Testing
This test configuration causes dbt to fail:
tests:
  - dbt_utils.accepted_values:
      column: status
      values: active, inactive

What is the error?
AThe test name is misspelled.
BThe values list is missing brackets and quotes.
CThe column name should be a list, not a string.
DThe values parameter should be called accepted_values.
Step-by-Step Solution
Solution:
  1. Step 1: Check YAML list syntax for values

    The values must be a list with brackets and quotes around each value.
  2. Step 2: Identify the error

    Here, values are given as a comma-separated string without brackets or quotes, causing failure.
  3. Final Answer:

    The values list is missing brackets and quotes. -> Option B
  4. Quick Check:

    Lists need brackets and quotes in YAML [OK]
Quick Trick: Always use brackets and quotes for lists in YAML [OK]
Common Mistakes:
MISTAKES
  • Passing comma-separated strings instead of lists
  • Misnaming parameters
  • Incorrect test names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes