Complete the code to reference the model named 'customers' using the ref() function.
select * from [1]('customers')
The ref() function is used in dbt to reference other models by name, ensuring dependencies are tracked correctly.
Complete the code to create a model that selects all columns from the 'orders' model using ref().
select * from [1]('orders')
Using ref('orders') tells dbt to use the 'orders' model as a dependency.
Fix the error in the code to correctly reference the 'sales' model with ref().
select * from [1]('sales')
source() instead of ref().The ref function must be called with parentheses and the model name as a string inside. In this code, the blank should be just ref so that the full call is ref('sales').
Fill both blanks to create a model that selects the 'id' and 'amount' columns from the 'transactions' model using ref().
select id, amount from [1]([2])
source instead of ref.The ref function is called with the model name as a string. Here, ref('transactions') correctly references the 'transactions' model.
Fill all three blanks to create a model that selects 'customer_id' and 'total' from the 'invoices' model, using ref(), and filters totals greater than 100.
select [1], [2] from [3]('invoices') where total > 100
source instead of ref.The columns to select are customer_id and total. The model is referenced with ref('invoices').