Assignment data sources

This topic explains how to analyze LaunchDarkly experiments using exposure data from an external data warehouse.

Assignment data records which contexts were exposed to which experiment variation. By default, LaunchDarkly generates this data from the flag or AgentControl config evaluations that your SDKs send. An assignment data source replaces that default with a query against your own warehouse. This lets you measure experiments where assignment happens outside LaunchDarkly. For example, you can analyze an experiment that an email platform, a marketing tool, or an internal data pipeline assigned.

Experiments that use an assignment data source do not use a flag or config. Instead, you select an assignment data source and the experiment you want to analyze from within that source.

A single assignment data source can contain assignments for many experiments, and you can reuse it across multiple experiments in the same project and environment.

Prerequisites

To create an assignment data source, you need:

Experiments that use an assignment data source have the following constraints:

  • They must use warehouse native metrics.
  • They do not use a flag config, which means they can’t use targeting rules.
  • They can use only one assignment data source each.
  • They cannot use holdouts or layers.
  • You must create the assignment data source before you build the experiment.

Warehouse access

When you set up your warehouse native Experimentation integration, you grant LaunchDarkly read access to the database and schema that contain your metric events.

If LaunchDarkly cannot read your assignment data, an error appears when you preview your query, along with the SQL statements that grant the access LaunchDarkly needs. Run those statements in your warehouse, then preview your query again.

Assignment data requirements

Each row your query returns represents one context’s exposure to one experiment variation. Your query must return a column for each of the following fields:

FieldDescriptionExample column values
Experiment IDThe experiment the assignment belongs to. You choose which experiment to analyze when you build the experiment in LaunchDarkly.homepage_banner_test, onboarding_email_test
Variant IDThe variation the context received. These values become the variants you compare in your experiment results.control, treatment
Context kindA column of unique identifiers, which you map to one of the context kinds defined in your LaunchDarkly project. You can map more than one identifier and context kind pair.user_id mapped to the user context kind
TimestampWhen the exposure occurred.2026-04-02 09:14:22

Choose a timestamp column that uses the timestamp or datetime format and encodes timezone information. LaunchDarkly uses the exposure timestamp to determine which metric events to attribute to each context. An ambiguous timezone can cause LaunchDarkly to attribute events incorrectly.

Use and manage assignment data sources

To learn how to create and use assignment data sources, read Creating and managing assignment data sources.