0
0
dbtdata~10 mins

Test severity levels in dbt - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the test severity to 'warn'.

dbt
severity: [1]
Drag options to blanks, or click blank then click option'
Awarn
Binfo
Cerror
Dfail
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fail' which is not a valid severity level.
Confusing 'warn' with 'error'.
2fill in blank
medium

Complete the code to define a test with severity set to 'error'.

dbt
tests:
  - unique:
      column_name: id
      severity: [1]
Drag options to blanks, or click blank then click option'
Askip
Berror
Cinfo
Dwarn
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'skip' which disables the test.
Using 'warn' when an error is needed.
3fill in blank
hard

Fix the error in the test severity assignment.

dbt
tests:
  - not_null:
      column_name: email
      severity: [1]
Drag options to blanks, or click blank then click option'
Afail
Bwarning
Cerror
Dwarn
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'warning' instead of 'warn'.
Using 'fail' which is invalid.
4fill in blank
hard

Fill both blanks to set a test severity to 'info' and disable failure.

dbt
tests:
  - accepted_values:
      column_name: status
      values: ['active', 'inactive']
      severity: [1]
      fail_on_warn: [2]
Drag options to blanks, or click blank then click option'
Ainfo
Btrue
Cfalse
Dwarn
Attempts:
3 left
💡 Hint
Common Mistakes
Setting 'fail_on_warn' to true which causes failure.
Using 'warn' instead of 'info' for severity.
5fill in blank
hard

Fill all three blanks to define a test with severity 'warn', disable failure on warn, and add a custom message.

dbt
tests:
  - unique:
      column_name: user_id
      severity: [1]
      fail_on_warn: [2]
      message: '[3]'
Drag options to blanks, or click blank then click option'
Aerror
Bfalse
CCheck user_id uniqueness
Dwarn
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'true' for 'fail_on_warn' which causes failure.
Missing or incorrect custom message.
Using 'error' instead of 'warn' for severity.