The problem I’m having
I am trying to run deployment job with Cloud IDE and Snowflake as database. All the models build successfully but the tests fail.
The context of why I’m trying to do this
I am trying to deploy code to production environment, by running a job with command ‘dbt build’. The debug logs error is “No active warehouse selected in the current session. Select an active warehouse with the ‘use warehouse’ command.”
What I’ve already tried
I checked my environment settings and profile both and I have set the warehouse to ‘transforming’. Not sure where else I need to set it up.
I am new to dbt and trying to learn my way up using the training material. Any help would be much appreciated.
Some example code or error messages
’
not_null_stg_orders_order_id.sql
2025-02-08 23:39:41.367064 (MainThread): 23:39:41
2025-02-08 23:39:41.367670 (MainThread): 23:39:41
2025-02-08 23:39:41.367670 (MainThread): 23:39:41 compiled code at target/compiled/explorer_platform/models/staging/_schema.yml/not_null_stg_orders_order_id.sql
2025-02-08 23:39:41.368307 (MainThread): 23:39:41
2025-02-08 23:39:41.368915 (MainThread): 23:39:41
2025-02-08 23:39:41.368915 (MainThread): 23:39:41 Failure in test unique_stg_locations_location_id (models/staging/_schema.yml)
2025-02-08 23:39:41.369653 (MainThread): 23:39:41
2025-02-08 23:39:41.369653 (MainThread): 23:39:41 Database Error in test unique_stg_locations_location_id (models/staging/_schema.yml)
000606 (57P03): No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
'
Put code inside backticks
to preserve indentation
which is especially important
for Python and YAML!