0
0
dbtdata~10 mins

Why sources define raw data contracts in dbt - Test Your Understanding

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

Complete the code to define a source in dbt.

dbt
sources:
  - name: [1]
    tables:
      - name: raw_users
Drag options to blanks, or click blank then click option'
Asource_data
Braw_data
Craw
Dusers
Attempts:
3 left
💡 Hint
Common Mistakes
Using table names instead of source names.
Using overly long or unclear source names.
2fill in blank
medium

Complete the code to add a freshness test to a source in dbt.

dbt
sources:
  - name: raw
    tables:
      - name: raw_users
        freshness:
          [1]: 24 hours
Drag options to blanks, or click blank then click option'
Awarn_after
Binterval
Cerror_after
Dmax_age
Attempts:
3 left
💡 Hint
Common Mistakes
Using interval which is not a valid freshness key.
Confusing error_after with warn_after.
3fill in blank
hard

Fix the error in the source definition by completing the missing key.

dbt
sources:
  - name: raw
    [1]: my_database
    tables:
      - name: raw_users
Drag options to blanks, or click blank then click option'
Adatabase
Blocation
Cschema
Dpath
Attempts:
3 left
💡 Hint
Common Mistakes
Using schema instead of database.
Using keys that do not exist in dbt source definitions.
4fill in blank
hard

Fill both blanks to define a source with a freshness test and a description.

dbt
sources:
  - name: raw
    database: analytics_db
    tables:
      - name: raw_orders
        description: [1]
        freshness:
          warn_after: [2]
Drag options to blanks, or click blank then click option'
A"Raw orders data from transactional system"
B24 hours
C7 days
D"Orders data from last month"
Attempts:
3 left
💡 Hint
Common Mistakes
Using a freshness interval that is too long for the data.
Leaving the description empty or unclear.
5fill in blank
hard

Fill all three blanks to create a source with database, schema, and freshness error threshold.

dbt
sources:
  - name: raw
    database: [1]
    schema: [2]
    tables:
      - name: raw_events
        freshness:
          error_after: [3]
Drag options to blanks, or click blank then click option'
Aanalytics_db
Braw_schema
C48 hours
Devents_db
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up database and schema names.
Using freshness values without units.