Complete the code to call a macro from another project in dbt.
SELECT * FROM {{ [1].my_macro() }}To call a macro from another project in dbt, you use the project name as a prefix before the macro name.
Complete the code to import a macro from another project named 'analytics' and call it.
{{ [1].calculate_metrics() }}The macro is called by prefixing it with the project name 'analytics'.
Fix the error in calling a macro from another project named 'sales'.
SELECT {{ sales[1]calculate_revenue() }}In dbt, to call a macro from another project, use a dot '.' to separate the project name and macro name.
Fill both blanks to correctly call a macro named 'get_data' from project 'marketing' with argument 'region'.
{{ [1].get_data([2]) }}The project name is 'marketing' and the argument should be a string, so use quotes around 'region'.
Fill all three blanks to create a dictionary comprehension that calls macro 'filter_data' from project 'finance' for each 'year' in 'years' list, filtering where year is greater than 2019.
{year: {{ [1].filter_data(year) }} for year in [2] if year [3] 2019}The macro is called from 'finance', the list is 'years', and the condition is year > 2019.