Search code examples
snowflake-cloud-data-platformetldata-warehousesnowflake-schemadbt

No active warehouse selected in the current session - Select an active warehouse with the 'use warehouse' command


I am following this tutorial: https://quickstarts.snowflake.com/guide/data_engineering_with_dbt/#4

when I try to run this in a worksheet:

SELECT * 
  FROM "KNOEMA_ECONOMY_DATA_ATLAS"."ECONOMY"."DATASETS"
 WHERE "DatasetName" ILIKE 'US Stock%'
    OR "DatasetName" ILIKE 'Exchange%Rates%';

I get an error that No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.

I am logged in as TESTUSER and as SECURITYADMIN role. I have also given necessary permissions:

enter image description here

What can I try? I tried to run this USE WAREHOUSE DBT_PROD_WH in a separate worksheet but it doesn't make any difference. I am not sure which warehouse I am supposed to use and with which role specifically


Solution

  • I've hit the same issue, following the same tutorial... basically there are no warehouses by default on the Snowflake account.

    My approach was to identify how I can create/manage the warehouse in this case.

    I've used the CREATE WAREHOUSE command (i.e. CREATE WAREHOUSE FIRST_WH)

    This got automatically selected as my current warehouse after it was created: enter image description here

    From there, just continue the tutorial.