Setting up the Snowflake integration

Contact us for help with configuring Snowflake native Experimentation

If you have both Data Export and Experimentation enabled for your LaunchDarkly account, you should have access to Snowflake native Experimentation. If you do not have access or need help getting started, contact your LaunchDarkly representative or start a Support ticket.

Snowflake native Experimentation works only with LaunchDarkly experiment data

You can only run Snowflake native experiments with data that was generated from a LaunchDarkly experiment. You cannot run Snowflake native experiments on data from third-party sources, or on LaunchDarkly flag evaluations that were not part of an experiment.

Overview

This topic explains how to set up the Snowflake native Experimentation integration.

Prerequisites

To configure the Snowflake integration, you must have the following prerequisites.

Snowflake data requirements

Before you begin, prepare your Snowflake data to meet the Snowflake data requirements for the integration.

Role permissions

The role permission requirements include:

IP addresses

You must add to your Snowflake allow list the following outbound IP addresses:

  • 52.21.152.96/32
  • 52.200.35.24/32
  • 52.200.50.23/32
  • 54.144.218.89/32
  • 54.221.221.197/32
  • 34.236.6.43/32

For a full list of LaunchDarkly’s public IP addresses, read Public IP list.

Network policy

  • If you use network policies within your Snowflake account, you will need to create or update your policy to allow traffic from LaunchDarkly. To do this, you need your LaunchDarkly project key and environment key:
    1. Find, copy, and save your project key following these instructions.
    2. Find, copy, and save your environment key following these instructions.
    3. Combine the keys together, separated by two underscores. For example, if your project key is MobileApp and your environment key is production, your combined key is MobileApp__production.
    4. Replace <ProjKey__EnvKey> with your combined key in the code sample below, and add it to your Snowflake network policy:
Snowflake network policy
1CREATE NETWORK RULE LD_EXPORT.EXPORT_<ProjKey__EnvKey>.LD_DATA_EXPORT_NETWORK_RULE TYPE = IPV4 MODE = INGRESS VALUE_LIST = ('35.192.85.117');
2
3CREATE NETWORK POLICY LD_DATA_EXPORT_NETWORK_POLICY
4 ALLOWED_NETWORK_RULE_LIST=(LD_DATA_EXPORT_NETWORK_RULE);
5
6ALTER USER LD_EXPORT_USER_<ProjKey__EnvKey> SET NETWORK_POLICY = LD_DATA_EXPORT_NETWORK_POLICY;

Step 1: Gather your Snowflake account information

To begin, collect the following information about your Snowflake account:

  • The name of the Snowflake database containing your metrics data. LaunchDarkly will be granted read access to this database.
  • The name of the schema within your metrics database. You don’t need this if you want to grant access to all schemas within the database.

Step 2: Configure the Snowflake Data Export integration

You must be using the latest version of the Snowflake Data Export integration

If you were using an earlier version of Snowflake Data Export, you must update it to the version released in January 2025.

To begin, configure the latest Snowflake Data Export integration. The Snowflake Data Export integration provides LaunchDarkly experiment exposure data to Snowflake. This data is used with your metric events data stored in Snowflake to compute experiment results.

Follow the installation instructions at Snowflake Data Export to configure the Snowflake Data Export integration. You can also view a 6-minute instructional video about Snowflake Data Export Setup.

Step 3: Configure the Snowflake native Experimentation integration

Now, you will configure the Snowflake native Experimentation integration in LaunchDarkly. This integration looks similar to the Snowflake Data Export integration, but is a separate integration requiring a separate setup process.

To set up the Snowflake native Experimentation integration:

  1. Navigate to the Integrations page.
  2. Search for and select Snowflake Native Experimentation.
  3. Click Add integration. The configuration panel appears.
  4. Enter an integration Name.
  5. Select the LaunchDarkly Project and environment for this integration. You cannot change this after you save the integration.

The Snowflake Native Experimentation configuration panel in LaunchDarkly.

The Snowflake Native Experimentation configuration panel in LaunchDarkly.
  1. Enter your Snowflake Metrics database name.
  2. (Optional) Enter your Snowflake Metrics schema name.
  3. LaunchDarkly generates a SQL script. Copy and save this script for use in the next step.

Keep the configuration screen open, as you will return to it in a later step.

Run the SQL script in Snowflake

Next, run the SQL script in Snowflake:

  1. In Snowflake, navigate to Projects / Worksheets.
  2. Click the + “Create SQL worksheet” button to create a new worksheet.
  3. Paste the generated script to the worksheet.
  4. Click the arrow to run the worksheet.

Save the configuration in LaunchDarkly

To finish the configuration in LaunchDarkly:

  1. Return to the LaunchDarkly configuration screen.
  2. Click Test connection and save.

Step 4: Create a metric data source

Now, you can set up your metric data source in LaunchDarkly by following the steps under Create data sources.

Step 5: Verify the connection

Finally, verify the connection. Successful connections show a green checkmark and display a “This connection is healthy” status.

Next steps

Read the following topics to understand how to create an experiment using a Snowflake native metric and how to analyze the experiment results:

The results page for an experiment using warehouse native metrics displays the date and time the results were last updated from Snowflake. The initial load of experiment results can take up to 60 minutes to appear, and further results updates appear within 15–30 minutes.