Creating warehouse native experiments

Overview

This topic explains how to set up and configure an experiment in LaunchDarkly that uses metric events from your own data warehouse.

Before you create a warehouse native experiment, you must enable Snowflake Data Export and configure the Warehouse Native Experimentation app in Snowflake for your LaunchDarkly account.

Configuring a warehouse native experiment requires several steps:

  1. Creating the flag and its variations,
  2. Creating one or more metrics,
  3. Building the experiment,
  4. Turning on the feature flag, and
  5. Starting an iteration.

These steps are explained in detail below.

Prerequisites

Before you build a warehouse native experiment, you must:

Create flags

Before you begin an experiment, create a flag with the variations you plan to test the performance of. You do not need to toggle on the flag before you create the experiment, but you do have to toggle on the flag before you start an experiment iteration. You cannot run an experiment on a flag that is running an active guarded or progressive rollout, and you cannot run experiments on migration flags.

To learn more, read Creating new flags and Creating flag variations.

Create metrics

Warehouse native experiments do not work with all metric types

Warehouse native experiments are compatible with custom conversion binary, custom conversion count, and custom numeric metrics that use the “average” analysis method. You cannot use clicked or tapped or page viewed metrics, you cannot use metric groups, and you cannot use metrics that use a percentile analysis method with warehouse native experiments.

Any metrics you use in a warehouse native experiment must be receiving metric events from your external warehouse. You can create new custom metrics for this, or you can use any existing metrics that already measure metric events from your external warehouse.

Build experiments

To build an experiment:

  1. Click Create and choose Experiment. The “Create experiment” page appears.
  2. Enter a Name.
  3. Enter a Hypothesis.
  4. Select the Snowflake native experiment type.
  5. (Optional) If you want to include the experiment in a holdout, click Advanced, then select a Holdout name.
  6. Click Next. The “Choose randomization unit and attributes” step opens.
  7. Choose a context kind from the Randomization unit menu.
  • If you included the experiment in a holdout, the experiment’s randomization unit is automatically set to the holdout’s randomization unit.
  1. (Optional) Choose up to five context attributes to filter results by.
  2. Click Next. The “Select metrics” step opens.
  3. Add a custom Metric, or click Create to create and use a new custom metric. The metrics you select must use the “average” analysis method, must use the same randomization unit as the experiment, and should include custom events coming from Snowflake.
  4. (Optional) If you have added multiple metrics, click the crown icon to change the primary metric:

A metric group with the primary metric denoted by a crown icon.

A metric group with the primary metric denoted by a crown icon.
  1. Click Next. The “Choose flag variations” step opens.
  2. Choose a Flag to use in the experiment, or click Create flag to create and use a new flag.
  3. Click Next. The “Set audience” step opens.
  4. In the “Define audience” section, choose which targeting rule to run the experiment on.
  • If you want to restrict your experiment audience to only contexts with certain attributes, create a targeting rule on the flag you include in the experiment and run the experiment on that rule.
  • If you don’t want to restrict the audience for your experiment, run the experiment on the flag’s default rule. If the flag doesn’t have any targeting rules, the flag’s default rule will be the only option.

The "Define audience" section with the default rule chosen.

The "Define audience" section with the default rule chosen.
  1. Enter the percentage of traffic you want to include in the experiment.
  2. Select which control variation you want LaunchDarkly to serve to the remaining population.
  • (Optional) Advanced: For most experiments, we recommend leaving the Advanced options on their default settings. To learn more, read Carryover bias and variation reassignment.

    The audience section of a new experiment.

    The audience section of a new experiment.
  1. Choose how you want to split the experiment audience:
  • Equally splits the experiment traffic equally between all variations in the experiment.
  • Percentage allows you to select specific percentages for each variation.
  1. Click Next. The “Choose your statistical approach and define success” step opens.
  2. Select a statistical approach of Bayesian or Frequentist.
  • If you selected a statistical approach of Bayesian, select a preset or Custom success threshold.
  • If you selected a statistical approach of frequentist, select:
    • a preset or Custom significance level.
    • a One-sided or Two-sided direction of hypothesis test, depending on how confident you are as to whether the difference between the control and treatment variations will be positive or negative.
  1. Click Finish. You are returned to the experiment’s Design tab.

After you have created your experiment, the next steps are to toggle on the flag and start an iteration.

You can also use the REST API: Create experiment

Turn on feature flags

For an experiment to begin recording data, the flag used in the experiment must be on. To learn how, read Turning flags on and off.

You can build multiple experiments on the same flag, but you can run only one of those experiments at a time.

Start experiment iterations

After you create an experiment and toggle on the flag, you can start an experiment iteration in one or more environments.

To start an experiment iteration:

  1. Navigate to the Experiments list.
  2. Click on the environment section containing the experiment you want to start.
  • If the environment you need isn’t visible, click the + next to the list of environment sections. Search for the environment you want, and select it from the list.

The environment selection menu.

The environment selection menu.
  1. Click on the name of the experiment you want to start an iteration for. The Design tab appears.
  2. Click Start.
  3. Repeat steps 1-4 for each environment you want to start an iteration in.

An experiment with the "Start" button called out.

An experiment with the "Start" button called out.

Experiment iterations allow you to record experiments in individual blocks of time. To ensure accurate experiment results, when you make changes that impact an experiment, LaunchDarkly starts a new iteration of the experiment.

To learn more about starting and stopping experiment iterations, read Managing experiments.

You can also use the REST API: Create iteration

Built with