Connecting to Snowflake

This guide will walk you through how to connect to Snowflake. You may need to contact the administrator of your Snowflake account if you lack some of the credentials discussed below.

  1. Click New Connection in the Manage Connections modal in PopSQL Screenshot of creating a New Database Connection in PopSQL
  2. Create a Nickname for this connection (for your own internal reference)
  3. For Type, choose Snowflake.
  4. Your Snowflake Account is whatever comes before when you sign into Snowflake directly. Screenshot of finding your Snowflake Account Screenshot of finding your Snowflake Account
  5. For Snowflake Warehouse, in your Snowflake account, click Warehouses, and choose your desired warehouse under the column Warehouse Name. Screenshot of finding your Snowflake Warehouse
  6. To find your Database, in your Snowflake account, click Databases, and look in the Database column. Screenshot of finding your Snowflake Database
  7. For Username and Password, enter the same credentials as you would enter when logging into your Snowflake account. Screenshot of Snowflake admin sign in portal

SSO, Okta, MFA/2FA

If you need MFA and/or Okta to sign into Snowflake, we support that on our Enterprise plan. Please get in touch with us if this applies to you.

The only thing your Snowflake administrator needs to do is:

-- Create OAuth security integration
create or replace security integration popsql
  type = oauth
  enabled = true
  oauth_client = custom
  oauth_client_type = 'CONFIDENTIAL'
  oauth_allow_non_tls_redirect_uri = true
  oauth_redirect_uri = ''
  oauth_issue_refresh_tokens = true
  oauth_refresh_token_validity = 86400;

-- Get the client ID and secrets. Note the integration name must be uppercase here
select system$show_oauth_client_secrets('POPSQL');