In the dbt_project.yml
file, I use an env_var. It looks something like this:
+grants:
select: |
{%- if env_var('DBT_SNOWFLAKE_ENVIRONMENT', 'DEV') in ['DEV', 'UAT'] -%}
{{ 'ROLEA' }}
{%- else -%}
{{ 'ROLEB' }}
{%- endif -%}
And in the astro UI, I’ve created a variable called DBT_SNOWFLAKE_ENVIRONMENT
and set different values based on the environment.
However, when I run the dag, it’s not picking up the value that I set on the UI. It’s always using the default value (i.e. DEV
).
Why is that? How to pass that variable from UI to the dbt_project.yml
file?