# Error while running deployment job with SnowFlake

**URL:** <https://discourse.getdbt.com/t/error-while-running-deployment-job-with-snowflake/18101>\
**Category:** Help\
**Created:** [February 9, 2025, 12:13am UTC](https://discourse.getdbt.com/t/error-while-running-deployment-job-with-snowflake/18101 "2025-02-09T00:13:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sphanse](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@sphanse](https://discourse.getdbt.com/u/sphanse)\
**Post date:** [February 9, 2025, 12:13am UTC](https://discourse.getdbt.com/t/error-while-running-deployment-job-with-snowflake/18101/1 "2025-02-09T00:13:48Z")

</div>

## 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.`

```auto
'
Put code inside backticks
  to preserve indentation
    which is especially important 
      for Python and YAML! 

```

---

<div class="post-metadata">

**Author:** ![sphanse](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@sphanse](https://discourse.getdbt.com/u/sphanse)\
**Post date:** [February 10, 2025, 7:45pm UTC](https://discourse.getdbt.com/t/error-while-running-deployment-job-with-snowflake/18101/3 "2025-02-10T19:45:30Z")

</div>

Do this in Snowflake  
show grants on warehouse transforming;

If you dont see "USAGE’ grant on your warehouse for your default role, run following as AccountAdmin. Here my warehouse was ‘transforming’ and default role was ‘PC\_dbt\_ROLE’.

GRANT USAGE ON WAREHOUSE transforming to ROLE PC\_dbt\_ROLE;

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [February 17, 2025, 7:46pm UTC](https://discourse.getdbt.com/t/error-while-running-deployment-job-with-snowflake/18101/4 "2025-02-17T19:46:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
