I am trying to pass a column into a macro for a calculation - specifically to take a date and return the # of days in that month. My code looks like this:
select {{ days_in_month(a.event_date) }}
from [table_name] a
when I try to build the model using ‘dbt run’, I get this error message: ‘a’ is undefined
I can’t find any examples in the docs where a column is passed into a macro, so maybe it’s not possible?