so I am referring this link ( About return function | dbt Developer Hub ) to understand the diff between {{ return() }} and {% do return() %}
I used like this
---- macro
{% macro get_cols() %}
{{- return([‘user_id’, ‘email’, ‘created_at’]) -}}
{% endmacro %}
— model
{% set cols = get_cols() %}
select
{% for col in cols %}
{{ col }}{% if not loop.last %},{% endif %}
{% endfor %}
from demo_users
i got all the columns in compiled code & then I tried using the another approach for the return
— macro.sql
{% macro get_cols() %}
{%- do return([‘user_id’, ‘email’, ‘created_at’]) %}
{% endmacro %}
still I got the same result and i tried multiple scenarios still getting same return values from both style.So I am confused can anyone help me with example to show where does the difference present actually .
else we should update the doc