DBT EXAM QUESTIONS & ANSWERS
Which files support source properties? - Answer -.yml files
What directory do source properties need to be? - Answer -models/
(or directory defined by the model-paths config)
What source property needs to be provided to configure freshness checks? - Answer -
loaded_at_field
The __________ property allows you to configure resources at the same time you're
defining properties in yaml files. - Answer -config
What built-in Jinja function references an environment variable? - Answer -{{
var('var_name') }}
Variables can be passed from your dbt_project.yml file into models during compilation. -
Answer -True
To define a variable in your project, add the ______ config to your dbt_project.yml -
Answer -vars:
Sources only support one configuration: ____________. - Answer -enabled
To apply a configuration to all models, do not use a - Answer -<resource-path>
_______________ represents the nested dictionary keys that provide the path to either
a directory of models, or a single model - Answer -resource-path
What is the resource-path in this example?
name: jaffle_shop
models:
jaffle_shop:
+enabled: false - Answer -jaffle_shop
To apply a configuration to one jaffle_shop model, nest the full path under the project
name. For a model at /staging/stripe/payments.sql, this would look like: - Answer -
name: jaffle_shop
models:
jaffle_shop:
staging:
stripe:
payments:
+enabled: false
, Define a source that is stored in the raw database - Answer -version: 2
sources:
- name: jaffle_shop
database: raw
tables:
- name: orders
- name: customers
What source property is defined as an extensible dictionary of metadata properties
specific to sources that point to external tables? - Answer -external
In the freshness block, one or both of _________ and ________ can be provided. If
neither is provided, then dbt will not calculate freshness snapshots for the tables in this
source. - Answer -warn_after and error_after
What is the source property used to define the acceptable amount of time between a
table's most recent record and the current time? - Answer -freshness
A column name (or expression) that returns a timestamp indicating freshness. - Answer
-loaded_at_field
True or False, loaded_at_field needs to be a date field - Answer -False, loaded_at_field
needs to be of type timestamp
Fill in the blanks below to error_after 24 hours and warn_after 12 hours for all
jaffle_shop sources
version: 2
sources:
- name: jaffle_shop
database: raw
freshness: # default freshness
warn_after: __________________________________
error_after: __________________________________
loaded_at_field: _etl_loaded_at - Answer -version: 2
sources:
- name: jaffle_shop
database: raw
freshness: # default freshness
warn_after: {count: 12, period: hour}
error_after: {count: 24, period: hour}
loaded_at_field: _etl_loaded_at
Given this source configuration:
Which files support source properties? - Answer -.yml files
What directory do source properties need to be? - Answer -models/
(or directory defined by the model-paths config)
What source property needs to be provided to configure freshness checks? - Answer -
loaded_at_field
The __________ property allows you to configure resources at the same time you're
defining properties in yaml files. - Answer -config
What built-in Jinja function references an environment variable? - Answer -{{
var('var_name') }}
Variables can be passed from your dbt_project.yml file into models during compilation. -
Answer -True
To define a variable in your project, add the ______ config to your dbt_project.yml -
Answer -vars:
Sources only support one configuration: ____________. - Answer -enabled
To apply a configuration to all models, do not use a - Answer -<resource-path>
_______________ represents the nested dictionary keys that provide the path to either
a directory of models, or a single model - Answer -resource-path
What is the resource-path in this example?
name: jaffle_shop
models:
jaffle_shop:
+enabled: false - Answer -jaffle_shop
To apply a configuration to one jaffle_shop model, nest the full path under the project
name. For a model at /staging/stripe/payments.sql, this would look like: - Answer -
name: jaffle_shop
models:
jaffle_shop:
staging:
stripe:
payments:
+enabled: false
, Define a source that is stored in the raw database - Answer -version: 2
sources:
- name: jaffle_shop
database: raw
tables:
- name: orders
- name: customers
What source property is defined as an extensible dictionary of metadata properties
specific to sources that point to external tables? - Answer -external
In the freshness block, one or both of _________ and ________ can be provided. If
neither is provided, then dbt will not calculate freshness snapshots for the tables in this
source. - Answer -warn_after and error_after
What is the source property used to define the acceptable amount of time between a
table's most recent record and the current time? - Answer -freshness
A column name (or expression) that returns a timestamp indicating freshness. - Answer
-loaded_at_field
True or False, loaded_at_field needs to be a date field - Answer -False, loaded_at_field
needs to be of type timestamp
Fill in the blanks below to error_after 24 hours and warn_after 12 hours for all
jaffle_shop sources
version: 2
sources:
- name: jaffle_shop
database: raw
freshness: # default freshness
warn_after: __________________________________
error_after: __________________________________
loaded_at_field: _etl_loaded_at - Answer -version: 2
sources:
- name: jaffle_shop
database: raw
freshness: # default freshness
warn_after: {count: 12, period: hour}
error_after: {count: 24, period: hour}
loaded_at_field: _etl_loaded_at
Given this source configuration: