Bird
0
0

How do you correctly specify a not_null test for the column email in a dbt schema.yml file?

easy📝 Syntax Q3 of 15
dbt - Advanced Testing
How do you correctly specify a not_null test for the column email in a dbt schema.yml file?
Acolumns: - name: email tests: - not_null
Bcolumns: - email: tests: - not_null
Ctests: - not_null: email
Dcolumns: - name: email tests: not_null
Step-by-Step Solution
Solution:
  1. Step 1: Review dbt YAML test syntax

    Tests are listed under the tests key as a list under each column's name.
  2. Step 2: Match correct indentation and structure

    columns: - name: email tests: - not_null correctly uses name and a list of tests including - not_null.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    YAML test syntax requires dash and proper nesting [OK]
Quick Trick: Use dash and indent under column name for tests [OK]
Common Mistakes:
MISTAKES
  • Incorrect indentation or missing dash
  • Placing tests outside columns section
  • Using wrong key names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes