# Expand variables of array type in the dbt\_project.yml file

**URL:** <https://discourse.getdbt.com/t/expand-variables-of-array-type-in-the-dbt-project-yml-file/13000>\
**Category:** Help\
**Tags:** variables\
**Created:** [April 22, 2024, 10:04am UTC](https://discourse.getdbt.com/t/expand-variables-of-array-type-in-the-dbt-project-yml-file/13000 "2024-04-22T10:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RTR72](https://avatars.discourse-cdn.com/v4/letter/r/c77e96/32.png) [@RTR72](https://discourse.getdbt.com/u/RTR72)\
**Post date:** [April 22, 2024, 10:04am UTC](https://discourse.getdbt.com/t/expand-variables-of-array-type-in-the-dbt-project-yml-file/13000/1 "2024-04-22T10:04:44Z")

</div>

.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

---

<div class="post-metadata">

**Author:** ![a\_slack\_user](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/a_slack_user/32/1629_2.png) [@a\_slack\_user](https://discourse.getdbt.com/u/a_slack_user)\
**Post date:** [April 22, 2024, 10:07am UTC](https://discourse.getdbt.com/t/expand-variables-of-array-type-in-the-dbt-project-yml-file/13000/2 "2024-04-22T10:07:47Z")

</div>

Unfortunately this isn’t supported today [https://github.com/dbt-labs/dbt-core/issues/4314](https://github.com/dbt-labs/dbt-core/issues/4314)

Note: `@Jeremy Yeo` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1713780462059829?thread_ts=1713780309.686029&cid=CBSQTAPLG). It might not have transferred perfectly.
