# Snowflake

This procedure explains how to configure a Snowflake database connection.

Before you begin
: Make sure your database instance is configured to accept incoming connections from the following IP address:
:
:
:
:
: ```
: 63.33.83.29
: ```
:
:
:
: > **Note:**
: > If you are using Datalore On-Premises, its IP address is different. Contact your Datalore administrator for details.

Procedure: Configure a Snowflake database connection

1. Open the New Snowflake connection dialog.

In a workspace:

1.  In the sidebar on the Home page, select the workspace where you want to create the connection.

2.

In the workspace resources, select ![Document](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/document.svg) Data and switch to the Databases tab.

![Databases tab](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/ws-databases.png)

3.  Click ![Plus icon](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/plus.svg) New database connection at the top right.

4.

In the dialog, select ![Snowflake](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/snowflake.svg) Snowflake.

![New database connection dialog](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/nb_dialog.png)

In a notebook:

1.  In the sidebar, select ![Attach](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/attach.svg) (Attached data).

2. Switch to the Databases tab.

3.

Click ![Plus](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/plus.svg) New database.

![The Attached data section in a notebook with the Databases tab open](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/database-notebook.png)

4.

In the dialog, select ![Snowflake](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/snowflake.svg) Snowflake.

![New database connection dialog](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/nb_dialog.png)

2. On the General tab, select the connection type.

* default: to connect by specifying the Host, Port, and Database.

* URL only: to connect by providing the URL of a pre-built connection. > **Note:** > Use this method to pass additional parameters. For example, add `&SSL=true` to the URL string to enable SSL.

3. (For default) In the Host field, type your Snowflake instance address.

4. (For default) In the Port field, type 443.

5. Select an authentication method:

> **Warning:**
> Deprecation notice: User & Password authentication method is in the deprecation phase. We advise against using it, as this might cause issues with your connection in the future.
>
>
>
> For more information, see [an official Snowflake blog](https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification/).

* User & Password: to connect using your login and password.

* Authenticator: to connect using the authenticator to verify the user login credentials. For example, to use browser-based SSO for authentication, enter `externalbrowser`. For more information about the authenticator, refer to the [Snowflake official documentation](https://docs.snowflake.com/en/user-guide/snowsql-start.html#authenticator).

* Key pair: to connect using the private RSA key stored in Datalore. > **Note:** > Passphrase-protected key pairs are currently not supported.

* Snowflake OAuth: to connect using the Snowflake OAuth method.

* Snowflake with stored tokens: to connect using access and refresh tokens.

* Snowflake Okta OAuth: to connect using Okta integration.

* Snowflake Azure OAuth: to connect using Azure OAuth2 integration.

* No auth: to connect without authentication.

6. Proceed based on the selected authentication method:

User & Password:
In the User and Password, provide your credentials.

Authenticator:

1. In the User and Password, provide your credentials.

2. In the Authenticator, provide the [authenticator](https://docs.snowflake.com/en/user-guide/snowsql-start#authenticator).

Key pair:

> **Tip:**
> For general guidance on generating private keys and configuring Snowflake to work with key pair authentication, refer to the [official Snowflake documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth).

1.  Specify the private key to be used for authentication.

![Datalore's Snowflake connection key pair configuration](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/snowflake_keypair.png)

2.

(Optional) If Datalore does not have a required private key , click Add RSA key to create one and follow the wizard prompt. You can paste the existing private key or ask Datalore to generate a new one by clicking a generate an RSA key link.

![Generating a new RSA key for Snowflake authentication](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/snowflake_generate_key.png)

Once created, the key will be saved as a workspace resource so it can be re-used later.

> **Tip:**
> Any previously created private keys can also be used to authenticate. See [Add and manage SSH keys](ssh-keys-in-workspace.html) for more details.

Snowflake OAuth:

Get a client ID and a client secret by following the [official instructions](https://docs.snowflake.com/en/user-guide/oauth-custom). Proceed by doing the following in the New Snowflake connection dialog:

1. In the Client ID field, paste your client ID.

2. In the Client secret field, paste your client secret.

Snowflake with stored tokens:

Get a client ID, client secret, and access and refresh tokens by following the [official instructions](https://docs.snowflake.com/en/user-guide/oauth-custom). Proceed by doing the following in the New Snowflake connection dialog:

1. In the Client ID field, paste your client ID.

2. In the Client secret field, paste your client secret.

3. Click Authenticate and fill tokens.

Snowflake Okta OAuth:

If you don't have a working Okta integration, refer to [Snowflake official docs](https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-configure-idp#okta-setup) and [this article](https://community.snowflake.com/s/article/How-To-Setup-SSO-Using-Okta-with-Snowflake-new-URL-format) to configure Okta as your IdP with Snowflake.Proceed by doing the following in the New Snowflake connection dialog:

1. In the Client ID field, paste your client ID.

2. In the Client secret field, paste your client secret.

3. In the Okta Issuer URL, paste the string containing the `EntityID / Issuer` for the Snowflake service provider.

Snowflake with Entra ID (Azure) OAuth:

If you do not have a working Entra ID (Azure) integration, refer to [Snowflake official docs](https://docs.snowflake.com/en/user-guide/oauth-azure) to create one. Proceed by doing the following in the New Snowflake connection dialog:

1. In the Client ID field, paste your client ID.

2. In the Client secret field, paste your client secret.

3. In the Azure Tenant ID field, paste your tenant ID.

4. In the Azure Resource URI field, paste your `Application ID URI`.

No auth:

No special steps are required for this option.

7. Based on the selected connection type, do the following:

default:

* In the Database field, provide the name of the database you want to connect to.

* (Optional) In the Schema field, provide the schema you want to access.

* (Optional) In the Warehouse field, type the name of a cluster of compute resources in Snowflake you want to use. For more information about warehouses, refer to the [Snowflake official documentation](https://docs.snowflake.com/en/user-guide/warehouses).

* (Optional) In the Role field, enter the database role. > **Note: Only for Snowflake with Entra ID (Azure) OAuth** > If you do not use role-specific scopes and only have [ANY role](https://docs.snowflake.com/en/user-guide/oauth-azure#using-any-role-with-external-oauth) configured, enter `session:role-any`.

URL only:
In the URL field, provide the URL of the pre-built connection you want to establish.

8. (Optional) For other options (SSH tunneling, scope inspection, or additional connection parameters), switch to the respective tab of the dialog and follow one of [these procedures](configure-a-database-connection.html).

9. Click the Test connection button at the bottom of the dialog.

10. Once the connection is successfully tested, click the Create and close button.

Procedure: Attach the connection to a notebook

In a workspace:

1. Open the notebook you want to attach the connection to.

2.  In the sidebar, select ![Attach](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/attach.svg) (Attached data) and switch to the Databases tab.

3. Enable the toggle in your database connection.

In a notebook:

1.  In the sidebar, select ![Attach](https://resources.jetbrains.com.cn/help/img/datalore/2026.3/attach.svg) (Attached data) and switch to the Databases tab.

2. Enable the toggle in your database connection.

## Next steps

* If OAuth authentication was used for this connection, report users and notebook collaborators may be required to provide their credentials to access the database.

* To retrieve and process data from the connected database, use [Query data with SQL cells](sql-cells.html) or query them .

* Learn how to manage and delete database connections [in a workspace](databases-as-workspace-resources.html) and [in a notebook](database-connections-on-notebook-level.html).

