Solved

Snowflake - getting "No active warehouse selected in the current session" error

  • 20 July 2020
  • 2 replies
  • 16508 views

Hello, I was trying to load my data to GoodData from Snowflake - created the connection, the model, but when trying to set the Automatic Data Distribution, I am getting following error:

2020-07-20T16:00:40.109+0200 [ERROR]: Fail to load projects "[puceqi1sg2z2cxcxsxs2k6brq5vn5uh3]". Reason: Unable to unload:
PreparedStatementCallback; SQL [COPY INTO @STAGE__20200720__8pwvUFfC/out_customer__20200720__j7O2j5sS__ FROM (SELECT "a__country" AS "a__country","cp__customerid" AS "cp__customerid" FROM "out_customer") FILE_FORMAT=(type=CSV NULL_IF=('') FIELD_OPTIONALLY_ENCLOSED_BY='"' compression='GZIP') OVERWRITE=true HEADER=true MAX_FILE_SIZE=100000000]; No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
; nested exception is net.snowflake.client.jdbc.SnowflakeSQLException: No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.
:
No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.

Can someone help me understand what I can do to make it work? Where can I put the ‘use warehouse’ command? I do have my warehouse selected in the connection and in the Snowflake console it  is marked as “started”.

Thank you.

icon

Best answer by Boris 21 July 2020, 15:10

View original

2 replies

Userlevel 2

Hello,

This error tend to happen if you specify invalid Warehouse in your data source configuration. If your warehouse is incorrectly specified and you click Test Connection button, you will get Connection failed! Warehouse not found message. 

You should always check that your configuration is correct before creating the data source by testing the connection and getting the Connection succeeded message.

 

Ah, I used different Warehouse and it is working now.

Thank you, Boris.

Reply