How to Connect Snowflake to DataGrip in PostgreSQL

Galaxy Glossary

How do I connect Snowflake to DataGrip?

Establish a JDBC connection from JetBrains DataGrip to a Snowflake warehouse so you can run, save, and debug SQL queries directly from the IDE.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

How do I add a new Snowflake data source in DataGrip?

Open DataGrip → Database tool-window → ⊕ → Data Source → Snowflake. The “Data Sources and Drivers” dialog appears with Snowflake-specific fields.

What JDBC URL should I use?

DataGrip auto-generates the URL after you enter Account, but you can override it. Format: jdbc:snowflake://<account>.snowflakecomputing.com/?warehouse=<WAREHOUSE>&db=<DATABASE>&schema=<SCHEMA>.

Which authentication methods does DataGrip support?

Select Username/Password, Key Pair, or OAuth. For SSO, choose OAuth and paste the token. For key pair auth, load the .p8 private key and enter the key passphrase.

How can I test the connection?

Click Test Connection. DataGrip downloads the Snowflake JDBC driver if missing, opens a TCP handshake, and validates your role’s access. Green check = success.

How do I run a query once connected?

Double-click the Snowflake data source, create a new SQL console, and type your query. Press ⌘ + Enter (Ctrl + Enter on Windows) to execute. Results appear in the bottom grid.

Best practices for stable Snowflake-DataGrip connections

Set CLIENT_SESSION_KEEP_ALIVE = TRUE in the driver properties to avoid timeouts. Use role-specific warehouses to control costs, and enable Auto-complete → Case sensitivity → Smart for quicker coding.

Common mistakes to avoid

Incorrect account name (exclude snowflakecomputing.com), and leaving the warehouse blank (queries fail with “No active warehouse”). Fix by double-checking the account identifier and specifying a default warehouse.

Why How to Connect Snowflake to DataGrip in PostgreSQL is important

How to Connect Snowflake to DataGrip in PostgreSQL Example Usage


-- Total spend per customer
SELECT c.id,
       c.name,
       SUM(o.total_amount) AS lifetime_value
FROM   Customers c
JOIN   Orders o ON o.customer_id = c.id
GROUP  BY c.id, c.name
ORDER  BY lifetime_value DESC;

How to Connect Snowflake to DataGrip in PostgreSQL Syntax


jdbc:snowflake://<account>.snowflakecomputing.com/?
    warehouse=<WAREHOUSE_NAME>&
    db=<DATABASE_NAME>&
    schema=<SCHEMA_NAME>&
    role=<ROLE>&
    authenticator=oauth

Example with ecommerce schema:
jdbc:snowflake://acme.snowflakecomputing.com/?warehouse=ANALYTICS_WH&db=ECOMMERCE&schema=PUBLIC&role=ANALYST_ROLE

Common Mistakes

Frequently Asked Questions (FAQs)

Does DataGrip support Snowflake multi-factor authentication?

Yes. Use OAuth or Key Pair auth. For OAuth, complete MFA in the browser and paste the generated token into DataGrip.

Can I switch roles or warehouses after connecting?

Absolutely. Run USE ROLE <role> or USE WAREHOUSE <warehouse> in the SQL console, or adjust them in the data source properties.

How do I keep the session alive?

Add CLIENT_SESSION_KEEP_ALIVE=true in Advanced properties or set it in the JDBC URL to prevent idle disconnects.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.