https://prefect.io logo
Title
i

Ivan

03/07/2023, 8:25 PM
hi team! I’m trying to run dbt CLI + Snowflake. However when I’m try to run it, I’m getting an error:
Database Error in model dbt_metrics_custom_calendar (models/dbt_metrics_custom_calendar.sql)
No active warehouse selected in the current session.  Select an active warehouse with the 'use warehouse' command.
What I’m doing wrong? It seems that the warehouse is already stated in SnowflakeTarget Block (and it shows when I’m running
dbt debug
), but when I’m trying to run some models, it gives me this kind of error.
>>> prefect.__version__
'2.8.3'
>>> prefect_dbt.__version__
'0.3.1'
>>> prefect_snowflake.__version__
'0.26.1'
2
s

Sean Williams

03/07/2023, 9:06 PM
I think it might have something to do with your specified Snowflake role in your profiles.yml file. In your first screenshot, it says
role: None
, but you might need to specify a role that has access to the warehouse,
DEVELOPER_WAREHOUSE
i

Ivan

03/07/2023, 11:02 PM
@Sean Williams Thanks for your suggestion! I’ve recreated a block and stated the role specifically to SYSADMIN. This role has an access to DEVELOPER_WAREHOUSE but I still get the same error. When I’m executing this model via terminal
dbt build --select dbt_metrics_custom_calendar
, it executes successfully but this error with warehouse is keeping to show up 🥲
image.png
s

Sean Williams

03/07/2023, 11:05 PM
WAREHOSE
->
WAREHOUSE
should do the trick
🤯 1
i

Ivan

03/07/2023, 11:09 PM
@Sean Williams Wow! it would be even funnier if I wrote “wareHORSE”. It’s finally working, thank you so much 🙏
😂 1
🐴 1