Complete the code to reference a model from another team in dbt.
select * from [1]
To share models across teams, use ref() with the correct model path. Here, marketing.campaigns references the marketing team's model.
Complete the code to create a model that selects data from a shared model in another team.
select user_id, purchase_amount from [1] where purchase_date > '2024-01-01'
The finance.transactions model is referenced here to select purchase data for analysis.
Fix the error in the code to correctly reference a model from another team.
select * from [1]
The ref() function requires the model name as a string in single quotes. Option A is the correct syntax.
Fill both blanks to create a model that filters data from a shared model and orders results.
select * from [1] where status = 'active' order by [2] desc
The model references sales.customers and orders by the created_at column descending.
Fill all three blanks to create a dictionary comprehension that maps model names to their row counts for shared models.
model_counts = { [1]: [2] for [3] in shared_models }The dictionary comprehension starts with {, maps each model to its row count using get_row_count(model), iterating over shared_models.