.bashrc - We have defines some variables in the .bashrc file
export ACCOUNTADMIN=“ACCOUNTADMIN”
export DB_OWNER_ROLE=“DB_OWNER_ROLE”
dbt_project.yml - In the dbt_project.yml file I want to define the above two variables as an array and have tried all permutations and combinations but with no luck. an example of what I am trying to do
vars:
role_for_pipes: ‘“{{ env_var(‘DB_OWNER_ROLE’) }}”, “{{ env_var(‘ACCOUNTADMIN’) }}”’
my.sql - the intention is to use the above role_for_pipes in the my.sql in the following fashion
role_for_pipe=var(‘role_for_pipes’)
{%- for role in var(‘role_for_pipes’) %}
GRANT APPLYBUDGET ON PIPE {{ schema_name }}.{{ pipe_name }} TO ROLE {{environment}}{{ role }};
GRANT MONITOR ON PIPE {{ schema_name }}.{{ pipe_name }} TO ROLE {{environment}}{{ role }};
GRANT OPERATE ON PIPE {{ schema_name }}.{{ pipe_name }} TO ROLE {{environment}}_{{ role }};
{%- endfor %}
I am unable to expand the variable in the dbt_project.yml file and neither can I find any documentation. Has anyone tried it or knows how to do it? Any assistance would be of much help. Thank you