Recall & Review
beginner
What is the purpose of built-in Jinja context variables in dbt?
Built-in Jinja context variables provide useful information and tools automatically available inside dbt models and macros to help you write dynamic SQL and control logic.
Click to reveal answer
beginner
What does the
this variable represent in dbt's Jinja context?this refers to the current model or resource being compiled, including its database, schema, and identifier. It helps build fully qualified table names.Click to reveal answer
intermediate
How can the
config variable be used in dbt models?config allows you to set model configurations dynamically inside your SQL or macros, such as materialization type or tags.Click to reveal answer
intermediate
Explain the use of the
var variable in dbt Jinja context.var lets you access user-defined variables passed from the command line or dbt_project.yml, enabling parameterized models.Click to reveal answer
intermediate
What information does the
target variable provide in dbt?target contains details about the current environment like database, schema, and type of connection, useful for environment-specific logic.Click to reveal answer
Which built-in Jinja variable in dbt gives you the current model's full name including database and schema?
✗ Incorrect
The
this variable represents the current model or resource with its full database, schema, and identifier.How do you access user-defined variables passed to dbt models?
✗ Incorrect
The
var variable allows access to user-defined variables passed from the command line or dbt_project.yml.Which variable would you use to write environment-specific logic in dbt?
✗ Incorrect
The
target variable contains information about the current environment, like database and schema.What is the main use of the
config variable in dbt models?✗ Incorrect
config is used to set model configurations like materialization inside SQL or macros.True or False: The
this variable can be used to build fully qualified table names.✗ Incorrect
True.
this includes database, schema, and identifier, so it helps build fully qualified names.Describe the role of the built-in Jinja context variables
this, var, and target in dbt.Think about how these variables help customize SQL based on model and environment.
You got /3 concepts.
How can the
config variable be used to change model behavior in dbt?Consider how you might want to change how a model runs without changing the whole project.
You got /3 concepts.