title: Query to Snowflake database isn't working because no active warehouse is selected
body: <p>I'm able to successfully connect to the Snowflake database via R but I'm having trouble getting the data because no active warehouse is selected. Below is the error message:</p>
  
  <p><em>No active warehouse selected in the current session. Select an active warehouse with the 'use warehouse' command.</em></p>
  
  <p>Here is my code I'm using.</p>
  
  <pre><code>  con &lt;- DBI::dbConnect(
      odbc::odbc(), 
      UID    = user, 
      PWD    = pass, 
      Server = host,
      Warehouse = 'YOUR_WAREHOUSE_NAME',
      Driver = "SnowflakeDSIIDriver",
      Role = role,
      Database = database,
      Autthenticator = "external browser"
    )
  
  dbGetQuery(con, "SELECT * FROM MY_TABLE LIMIT 100")
  </code></pre>
  
  <p>I've based my connection and query from this thread on <a href="https://community.rstudio.com/t/query-data-from-snowflake-database/12937/3" rel="noreferrer">RStudio Community</a> but I'm not having any luck. I've also tried using the 'use warehouse MY_WAREHOUSE' command in my query without any luck.</p>
  
  <p>Note: I can connect successfully and query data via Python so I think this is an R specific issue.</p>