0
0
dbtdata~10 mins

Source freshness checks 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 define a source freshness check in dbt.

dbt
sources:
  - name: my_source
    freshness:
      [1]: 24 hours
Drag options to blanks, or click blank then click option'
Awarn_after
Berror_after
Cfreshness_check
Dmax_age
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'error_after' instead of 'warn_after' for warning threshold.
Confusing 'max_age' with freshness config keys.
2fill in blank
medium

Complete the code to set an error threshold for source freshness in dbt.

dbt
sources:
  - name: my_source
    freshness:
      warn_after: 24 hours
      [1]: 48 hours
Drag options to blanks, or click blank then click option'
Aerror_after
Bfail_after
Cmax_age
Dalert_after
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'fail_after' which is not a valid key.
Confusing 'max_age' with error threshold.
3fill in blank
hard

Fix the error in the freshness check configuration.

dbt
sources:
  - name: sales_data
    freshness:
      warn_after: 12 hours
      [1]: 6 hours
Drag options to blanks, or click blank then click option'
Afail_after
Bwarn_after
Cmax_age
Derror_after
Attempts:
3 left
💡 Hint
Common Mistakes
Setting 'error_after' to a smaller duration than 'warn_after'.
Using invalid keys like 'fail_after'.
4fill in blank
hard

Fill both blanks to create a source freshness check with a warning after 1 day and error after 2 days.

dbt
sources:
  - name: user_data
    freshness:
      [1]: 1 day
      [2]: 2 days
Drag options to blanks, or click blank then click option'
Awarn_after
Berror_after
Cmax_age
Dfreshness_check
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping 'warn_after' and 'error_after' values.
Using invalid keys like 'max_age' or 'freshness_check'.
5fill in blank
hard

Fill all three blanks to define a source freshness check with a warning after 6 hours, error after 12 hours, and a filter condition.

dbt
sources:
  - name: orders
    freshness:
      [1]: 6 hours
      [2]: 12 hours
      filter: "[3]"
Drag options to blanks, or click blank then click option'
Awarn_after
Berror_after
Cstatus = 'active'
Dmax_age
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'max_age' instead of 'warn_after' or 'error_after'.
Not quoting the filter condition properly.