Complete the code to define a source in dbt.
sources:
- name: [1]
tables:
- name: raw_usersThe source name should be a simple identifier like raw to represent raw data sources.
Complete the code to add a freshness test to a source in dbt.
sources:
- name: raw
tables:
- name: raw_users
freshness:
[1]: 24 hoursinterval which is not a valid freshness key.error_after with warn_after.The warn_after key sets the freshness threshold to warn if data is older than 24 hours.
Fix the error in the source definition by completing the missing key.
sources:
- name: raw
[1]: my_database
tables:
- name: raw_usersschema instead of database.The database key specifies the database where the source table lives.
Fill both blanks to define a source with a freshness test and a description.
sources:
- name: raw
database: analytics_db
tables:
- name: raw_orders
description: [1]
freshness:
warn_after: [2]The description explains the source table, and warn_after sets freshness to 24 hours.
Fill all three blanks to create a source with database, schema, and freshness error threshold.
sources:
- name: raw
database: [1]
schema: [2]
tables:
- name: raw_events
freshness:
error_after: [3]The database is analytics_db, schema is raw_schema, and freshness error threshold is 48 hours.