Datalore 2024.5 Help

Snowflake

This procedure explains how to configure a Snowflake database connection.

Configure a Snowflake database connection

  1. Open the New Snowflake connection dialog. Select the tab for one of the two options:

    • From the editor, to attach the new database to a specific notebook

    • From the Home page, to add a database connection to a workspace

    1. Open the Attached data tool from the left-hand sidebar.

    2. Switch to the Databases tab. You will see the list of all database connections available from the respective workspace.

    3. At the bottom of the tab, click New database.

      Creating connection from notebook
    4. In the New database connection dialog, select Snowflake.

    1. On the Home page, select the workspace where you want to create the connection.

    2. In the selected workspace, go to Data | Databases.

      Selecting a workspace
    3. Click the Add button in the upper right corner. The New database connection dialog will open.

    4. In the New database connection dialog, select Amazon Redshift.

      New database connection dialog
    5. In the New database connection dialog, select Snowflake.

  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.

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

  4. (For default) In the Port field, type the port of BigQuery. The default port is 443.

  5. Select an authentication method:

    • 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.

    • 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:

    In the User and Password, provide your credentials.

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

    2. In the Authenticator, provide the authenticator.

    Get a client ID and a client secret by following the official instructions. 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.

    Get a client ID, client secret, and access and refresh tokens by following the official instructions. 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.

    If you don't have a working Okta integration, refer to Snowflake official docs and this article 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.

    If you don't have a working Azure integration, refer to Snowflake official docs 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 special steps are required for this option.

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

    • 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.

    • (Optional) In the Role field, provide the database role.

    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.

  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.

Results

  • If created for a specific notebook, the new connection will be automatically added to the workspace. You can later attach this database connection to any other notebook from this workspace.

  • If created for a workspace, this connection is added to the workspace databases and can be attached to any notebook from this workspace.

  • 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.

Last modified: 19 November 2024