Establish a JDBC connection from JetBrains DataGrip to a Snowflake warehouse so you can run, save, and debug SQL queries directly from the IDE.
Open DataGrip → Database tool-window → ⊕ → Data Source → Snowflake. The “Data Sources and Drivers” dialog appears with Snowflake-specific fields.
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>
.
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.
Click Test Connection. DataGrip downloads the Snowflake JDBC driver if missing, opens a TCP handshake, and validates your role’s access. Green check = success.
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.
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.
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.
Yes. Use OAuth or Key Pair auth. For OAuth, complete MFA in the browser and paste the generated token into DataGrip.
Absolutely. Run USE ROLE <role>
or USE WAREHOUSE <warehouse>
in the SQL console, or adjust them in the data source properties.
Add CLIENT_SESSION_KEEP_ALIVE=true
in Advanced properties or set it in the JDBC URL to prevent idle disconnects.