[Bug] If a role doesn't have access to target.warehouse
, when resetting the warehouse back to the initial warehouse because the snowflake_warehouse
config is used, we emit a use warehouse None
which errors
#928
Labels
Is this a new bug?
Which packages are affected?
Current Behavior
When the default warehouse (
target.warehouse
) is not available to the user/role OR does not exist, dbt emits ause warehouse None
when it switches back to the default warehouse (for models that use thesnowflake_warehouse
config.Expected Behavior
At minimum, we should emit
use warehouse {{ target.warehouse }}
instead of the current behaviour.Steps To Reproduce
use role accountadmin; create warehouse transformer_cant_use with warehouse_size = xsmall;
^ Make sure to use a
snowflake_warehouse
config that the roletransformer
can actually use.select current_warehouse() as warehouse
to check what the current one is - however, it looks like if you don't have access to it - the result isNone
.None != 'analytics'
- we then calluse warehouse analytics
.None
.Relevant log output
Environment
Additional Context
Checking the output of
current_warehouse()
when warehouse is not available to role:Note:
None
is also returned if the warehouse doesn't exist.The text was updated successfully, but these errors were encountered: