Complete the code to define a dbt model that selects all columns from the source table.
select * from [1]
ref() instead of source() for source tables.The source() function is used to refer to a source table in dbt, specifying the source name and table name.
Complete the code to create a model that depends on another model called 'customers'.
select * from [1]
source() instead of ref() for models.ref().The ref() function creates a dependency on another dbt model, here 'customers'.
Fix the error in the model code to correctly reference the 'orders' model.
select * from [1]
source() instead of ref() for models.The model name is 'orders', so ref('orders') correctly references it.
Fill both blanks to create a model that selects customer names and filters orders with amount greater than 100.
select customer_name, order_amount from [1] where order_amount [2] 100
source() instead of ref() for models.The model depends on 'orders' so ref('orders') is used. The filter uses the greater than operator > to select orders above 100.
Fill all three blanks to create a dictionary comprehension that maps model names to their SQL code if the model name starts with 'stg_'.
model_sql = { [1]: [2] for [3] in models if [3].startswith('stg_') }The comprehension maps model.name to model.sql for each model in models where the name starts with 'stg_'.