A. The test will fail because NULL values exist in user_id.
B. The test will pass because NULLs are allowed.
C. The test will be ignored by dbt.
D. The test will cause a syntax error.
Solution
Step 1: Understand the not_null test
This test checks that the specified column has no NULL values.
Step 2: Analyze the presence of NULLs
If user_id contains NULLs, the test will detect them and fail.
Final Answer:
The test will fail because NULL values exist in user_id. -> Option A
Quick Check:
not_null test + NULL values = Fail [OK]
Hint: not_null test fails if any NULL found [OK]
Common Mistakes:
Assuming NULLs pass not_null test
Thinking test is ignored automatically
Believing syntax error occurs
4. You wrote this dbt test to ensure no duplicate emails:
tests:
- unique:
column_name: email
But it does not run. What is the error?
medium
A. The test name should be unique without parameters.
B. The test should be written as - unique without column_name.
C. The test should be under the columns section with just - unique.
D. The test requires a SQL file, so this YAML is invalid.
Solution
Step 1: Check correct test syntax in dbt schema.yml
Tests on columns go under the columns section with just - unique listed.
Step 2: Identify the mistake
The test is incorrectly placed and uses column_name, which is not valid here.
Final Answer:
The test should be under the columns section with just - unique. -> Option C
Quick Check:
Unique test syntax = under columns with - unique [OK]
Hint: Place tests under columns with simple names [OK]
Common Mistakes:
Using parameters like column_name in schema tests
Placing tests outside columns section
Thinking SQL files are needed for built-in tests
5. Your team wants to ensure data trust by documenting all models and adding tests in dbt. Which combination best supports governance?
hard
A. Write detailed model descriptions and add tests like not_null and unique on key columns.
B. Only add tests without documentation to save time.
C. Document models but skip tests since they slow down builds.
D. Use snapshots only to track data changes without tests or docs.
Solution
Step 1: Understand governance needs
Governance requires both clear documentation and data quality checks to build trust.
Step 2: Evaluate options
Write detailed model descriptions and add tests like not_null and unique on key columns. combines documentation and tests, supporting governance best. Others skip key parts.
Final Answer:
Write detailed model descriptions and add tests like not_null and unique on key columns. -> Option A
Quick Check:
Docs + tests = Strong governance [OK]
Hint: Combine docs and tests for best governance [OK]
Common Mistakes:
Skipping docs or tests thinking one is enough
Avoiding tests to speed builds
Relying only on snapshots for trust
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.