Skip to main content

Snowflake configuration

To add a Snowflake data source to Latitude, you're required to create an OAuth application within Snowflake. Here's how to do it:

1. Create a new data source in Latitude

First, you have to create a new data source in Latitude to connect Snowflake.

  1. Go to Settings (link).

  2. Access the Data sources section.

  3. Click on Add new data source.

  4. Select Snowflake.

  5. Copy the snippet we provide in the Snowflake config.

    ☝️ Be careful, don’t close the modal window. We generate an ID for each integration.

2. Create the security integration

Now you can create the integration in Snowflake.

  1. Go to your Snowflake account.

  2. Open an existing worksheet or create a new one.

  3. Paste the snippet into a worksheet.

    ☝️ Make sure the name of your integration has no spaces

    ☝️ Remember the name of your integration, we will use it in step ‘3. Get the client_id and client_secret’.

  4. Run the code and the integration will be created in Snowflake, but now you have to connect it to Latitude.

3. Get the client_id and client_secret

Let's get the client_id and client_secret required to communicate Snowflake and Latitude.

  1. In the same worksheet, add a new line and paste the following code:

    select system$show_oauth_client_secrets('<INTEGRATION_NAME>');
  2. Replace <INTEGRATION_NAME> with the name of your integration.

    ☝️ Remember to use the name you put in the previous step after the code create security integration.

    ☝️ Remember to use uppercase.

  3. Run the code.

  4. Select the first column of the results.

  5. On the right side of the console you'll see some JSON containing the client secret and client ID:

  6. Don’t close this tab because now you can go back to Latitude and fill out all the missing information.

4. Fill out the integration information

Go back to the window we opened in step 1 to fill out the fields.

  • Alias → The name you'll see for this source in Latitude. This doesn’t affect anything in your database.

  • Client ID → The ID of your integration to access Snowflake from Latitude.

  • Client secret → The key of your integration to access Snowflake from Latitude.

  • Account ID → The ID of your Snowflake account. You have to use the following format: <your_id> + .snowflakecomputing.com

    You can get the ID by following these steps:

    1. When you enter the Snowflake app, the URL will have the ID and the region.

    2. Depending on the console version you have, the position will be different:

      New version:

      Old version:

    3. If you have the old version, you have to format it to <your_id>.<region>. So in this case: 1234abc.eu-central-1

  • Warehouse → The name of the space where your database is included in Snowflake.

    ☝️ Remember to use uppercase.

  • Database → The name of your database in Snowflake.

    ☝️ Remember to use uppercase.

  • Role → The name of the role configured in Snowflake to access your database.

    ☝️ Remember to use uppercase.

Once configured, save the changes.

5. Authorize the integration

Everything should be ready to authorize the integration, so let’s do it.

  1. In Latitude, go to the details of your integration and click the button “Authorize”.
  2. Log in to Snowflake.
  3. Authorize the integration.
  4. Done! Now you can see and query your tables from Snowflake in Latitude.
info

If your data source has a firewall, you can whitelist our static IP: 18.193.205.15