# dbt profile file usage - multiple targets and roles segregation

**URL:** <https://discourse.getdbt.com/t/dbt-profile-file-usage-multiple-targets-and-roles-segregation/20490>\
**Category:** Help\
**Tags:** best-practice, snowflake, dbt-cloud\
**Created:** [December 12, 2025, 5:34pm UTC](https://discourse.getdbt.com/t/dbt-profile-file-usage-multiple-targets-and-roles-segregation/20490 "2025-12-12T17:34:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbt\_learner](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dbt\_learner](https://discourse.getdbt.com/u/dbt_learner)\
**Post date:** [December 12, 2025, 5:34pm UTC](https://discourse.getdbt.com/t/dbt-profile-file-usage-multiple-targets-and-roles-segregation/20490/1 "2025-12-12T17:34:35Z")

</div>

I have various roles in snowflake  
CI\_CD\_ROLE - to be used for deploying dbt projects to snowflake ( for snow dbt deploy …)  
EXEC\_ROLE - to be used for executing the dbt project from snowflake after deploy (for dbt run … will be executd by human from UI or programetic)

CI\_CD\_ROLE & EXEC\_ROLE have distinct access levels & need to be used for its own action

my profiles.yml file looks like

\<profile\_name\>:  
target: dev  
outputs:  
dev:  
type: snowflake  
account: “account”  
database: “MY\_DB”  
schema: “MY\_SCHEMA”  
warehouse: “MY\_WH”  
role: “CICD\_ROLE” # this is where the problem is  
threads: 4  
client\_session\_keep\_alive: false

This profile file deploys the dbt project to snowflake , but fails as the CI\_CD\_ROLE do not have permissions to dbt run

If i change the role in profile file to “EXEC\_ROLE” - the deployment fails as CI\_CD\_ROLE cannot inherit EXEC\_ROLE for deploy.

How can this be handled..

I tried keeping two differnt blocks /env one with CI\_CD role and one with EXEC role, like  
\<profile\_name\>:  
target: dev  
outputs:  
dev:  
type: snowflake  
account: “account”  
database: “MY\_DB”  
schema: “MY\_SCHEMA”  
warehouse: “MY\_WH”  
role: “CICD\_ROLE” # this is where the problem is  
threads: 4  
client\_session\_keep\_alive: false  
exec\_role1:  
type: snowflake  
account: “account”  
database: “MY\_DB”  
schema: “MY\_SCHEMA”  
warehouse: “MY\_WH”  
role: “EXEC\_ROLE”  
threads: 4  
client\_session\_keep\_alive: false

but this fails too as there is no env or target as exec\_role1: in snowflake to “run”. and also the default target “dev” gets added to run automatically failing

---

<div class="post-metadata">

**Author:** ![spramanik](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/spramanik/32/6216_2.png) [@spramanik](https://discourse.getdbt.com/u/spramanik)\
**Post date:** [February 2, 2026, 6:37pm UTC](https://discourse.getdbt.com/t/dbt-profile-file-usage-multiple-targets-and-roles-segregation/20490/2 "2026-02-02T18:37:56Z")

</div>

When you are using _snow dbt deploy,_ you have an argument as _—role_ that you can use to overwrite the role mentioned in the connection config. So in your case you can keep the role as EXEC\_ROLE in profiles.yaml and while doing deploy you can pass the CI\_CD\_ROLE
