Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What are the common test severity levels in dbt?
The common test severity levels in dbt are error and warn. - error: Fails the run if the test fails. - warn: Logs a warning but does not fail the run.
Click to reveal answer
beginner
How does setting a test severity to 'warn' affect a dbt run?
Setting a test severity to 'warn' means that if the test fails, dbt will log a warning message but will not stop or fail the entire run. This allows the pipeline to continue while highlighting potential issues.
Click to reveal answer
beginner
What happens when a dbt test with severity 'error' fails?
When a dbt test with severity 'error' fails, the entire dbt run stops and fails. This is used for critical tests where failure means the data or model is not reliable.
Click to reveal answer
intermediate
How do you specify test severity in a dbt schema.yml file?
In the schema.yml file, you specify severity inside the test configuration like this:
tests: - unique: severity: warn
This sets the test severity to 'warn' for that test.
Click to reveal answer
intermediate
Why is it useful to have different test severity levels in dbt?
Different severity levels let you control how strict your data quality checks are.<br> - Use 'error' for critical checks that must pass.<br> - Use 'warn' for less critical checks to monitor issues without stopping the pipeline.<br>This helps balance reliability and workflow continuity.
Click to reveal answer
What does a test severity of 'warn' do in dbt?
AAutomatically fixes the data issue
BFails the run if the test fails
CIgnores the test completely
DLogs a warning but continues the run
✗ Incorrect
A 'warn' severity logs a warning when the test fails but does not stop the dbt run.
Which severity level causes dbt to stop the run on test failure?
Awarn
Berror
Cinfo
Ddebug
✗ Incorrect
The 'error' severity causes dbt to fail and stop the run if the test fails.
Where do you set the severity level for a dbt test?
AIn the schema.yml file under the test configuration
BIn the dbt run command
CIn the model SQL file
DIn the dbt_project.yml file
✗ Incorrect
Severity is set in the schema.yml file inside the test configuration.
Why might you use 'warn' instead of 'error' for some tests?
ATo allow the pipeline to continue while monitoring issues
BTo speed up the dbt run
CTo ignore the test results
DTo automatically fix data errors
✗ Incorrect
'warn' allows the pipeline to continue but still alerts you to potential data issues.
What is the default severity level if none is specified in dbt tests?
Ainfo
Bwarn
Cerror
Ddebug
✗ Incorrect
By default, dbt treats tests as 'error' severity if not specified.
Explain the difference between 'warn' and 'error' severity levels in dbt tests.
Think about how each severity affects the dbt run behavior.
You got /4 concepts.
Describe how to set a test severity level in a dbt schema.yml file with an example.
Look at the test configuration block in schema.yml.
You got /3 concepts.
Practice
(1/5)
1. What does setting a dbt test severity level to ERROR do?
easy
A. It stops the dbt run if the test fails.
B. It only logs a warning but continues the run.
C. It ignores the test result completely.
D. It retries the test automatically.
Solution
Step 1: Understand dbt test severity levels
dbt uses severity levels to decide what happens when a test fails.
Step 2: Identify the effect of ERROR severity
When severity is set to ERROR, dbt stops the run immediately on failure.
Final Answer:
It stops the dbt run if the test fails. -> Option A
Quick Check:
ERROR severity = stops run [OK]
Hint: ERROR severity stops the run; WARN just warns [OK]
Common Mistakes:
Confusing ERROR with WARN severity
Thinking ERROR retries the test
Assuming ERROR ignores failures
2. Which of the following is the correct way to set a test severity to WARN in a dbt YAML test configuration?
easy
A. severity: warn
B. severity = WARN
C. severity: WARN
D. severity: Warning
Solution
Step 1: Recall YAML syntax for dbt test severity
dbt expects severity as a key-value pair with uppercase values like WARN or ERROR.
Step 2: Identify correct syntax
The correct syntax uses a colon and uppercase WARN: severity: WARN.
Final Answer:
severity: WARN -> Option C
Quick Check:
YAML key-value with uppercase WARN = correct [OK]
Hint: Use colon and uppercase WARN for severity [OK]
Common Mistakes:
Using lowercase 'warn' instead of uppercase
Using equals sign instead of colon
Spelling severity value incorrectly
3. Given this dbt test configuration snippet:
tests:
- unique:
column_name: id
severity: WARN
What happens if the test fails during a dbt run?
medium
A. The failure is logged as a warning, but the run continues.
B. The test automatically retries until it passes.
C. The test is ignored and no message is shown.
D. The run stops immediately with an error.
Solution
Step 1: Analyze the severity level in the test config
The severity is set to WARN, which means dbt should warn but not stop.
Step 2: Understand dbt behavior on WARN severity
When a test fails with WARN severity, dbt logs a warning and continues the run.
Final Answer:
The failure is logged as a warning, but the run continues. -> Option A
Quick Check:
WARN severity = warn and continue [OK]
Hint: WARN severity warns but lets run continue [OK]
But your dbt run does not stop when the test fails. What is the likely problem?
medium
A. The test name 'not_null' is invalid.
B. The severity key is misplaced; it should be under 'config'.
C. The severity value should be lowercase 'error'.
D. The test is not actually failing.
Solution
Step 1: Check correct placement of severity in dbt tests
Severity must be set inside the config block, not directly under the test.
Step 2: Identify why run does not stop
Since severity is misplaced, dbt ignores it and uses default behavior, so run does not stop.
Final Answer:
The severity key is misplaced; it should be under 'config'. -> Option B
Quick Check:
Severity must be inside config = The severity key is misplaced; it should be under 'config'. [OK]
Hint: Put severity inside config block to take effect [OK]
Common Mistakes:
Using lowercase severity value
Misplacing severity outside config
Assuming test name is wrong
5. You want to run a dbt test that warns on missing emails but errors on duplicate emails. Which YAML configuration correctly sets different severities for these tests on the email column?