pass a parameter to ref dbt jinja

Viewed 91

I have a macro. How can I pass correctly model name to a ref function ?

{% macro count_all_macro(model) %}


SELECT count(*) FROM {{ ref ( {{ model }} ) }}
{% endmacro %}
1 Answers

I just needed to pass to a ref function without {{ }} SO it will look like

SELECT count(*) FROM {{ ref ( model ) }}

Related