Medium severityconfiguration
Power BI Refresh Error:
DbtSnowflakeRoleNotSetError
What does this error mean?
The dbt-snowflake adapter cannot determine which Snowflake role to use because the role field is missing from the dbt profile, causing it to fall back to the user's default role, which may lack the required permissions.
Common causes
- 1The role field is omitted from the dbt profile and the user's default Snowflake role does not have access to the target schema
- 2The role field is present but set to None or an empty string
- 3A model-level snowflake_role config was used for specific models but no base role was set in the profile
- 4The profile was migrated from another database adapter and the role field was not added
How to fix it
- 1Step 1: Add the role field to the Snowflake target in profiles.yml: role: TRANSFORMER.
- 2Step 2: Confirm the role exists in Snowflake and is granted to the user: SHOW GRANTS TO USER <username>;
- 3Step 3: If using dbt Cloud, update the environment credentials to include the role field.
- 4Step 4: Run dbt debug to confirm the active role after the profile change.
- 5Step 5: Grant the role the necessary privileges on the target database and schema if it lacks them.