Snowflake data requirements
Overview
This topic explains the data requirements for Snowflake native Experimentation.
To use Snowflake native Experimentation, two types of data sources are required: assignment data and metric events data. These two datasets are required for computing metrics and analyzing experiment results. LaunchDarkly handles generating and exporting experiment assignment data, and you are responsible for ensuring that metric event data is prepared, stored, formatted, and refreshed appropriately in your Snowflake warehouse.
Assignment data
Assignment data is a timestamped dataset that tracks which context, such as a user or account, was exposed to which experiment variation and when. Each row represents a unique assignment event, tracking the experiment exposure for each context. This data is automatically generated by LaunchDarkly when you run an experiment and is exported to Snowflake using the Snowflake Data Export integration. To prepare and use the assignment data dataset, configure the Snowflake Data Export integration.
Snowflake Native Experimentation works only with LaunchDarkly experiment data
You cannot run Snowflake native experiments on experiment data coming from third-party sources, or flag evaluation data from LaunchDarkly that was not generated as part of a LaunchDarkly experiment.
Metric events data
Metric events data is a timestamped dataset that tracks individual context observations that LaunchDarkly uses to calculate experiment metrics.
For example:
- “Alice submitted a form at 2025-01-10 09:00:00"
- "George purchased a $10 order at 2025-01-11 13:10:13”
You need to prepare this dataset in Snowflake according to the metric events schema, below. You will grant LaunchDarkly access to that dataset as part of the integration setup process.
Metric events schema
To use your existing metric events data in your Snowflake account, you must prepare a metric events data either as a table or view.
This table or view should have SELECT
privilege on ACCOUNTADMIN
role. The schema is as follows:
Column name | Type | Example | Description |
---|---|---|---|
EVENT_ID | VARCHAR, NOT NULL | metric-event-id-123abc | A unique ID for the event. |
EVENT_KEY | VARCHAR, NOT NULL | Order placed | The event key. |
CONTEXT_KIND | VARCHAR, NOT NULL | user, member | The kind of the context for the metric event. |
CONTEXT_KEY | VARCHAR, NOT NULL | user-key-123abc | The key of the context for the metric event. |
EVENT_VALUE | FLOAT | 3.1 | The event value. |
RECEIVED_TIME | TIMESTAMP_TZ, NOT NULL | 2024-10-22T17:00:00Z | The time (UTC) the metric event was received. |
Create the metric events schema table
Here is an example query to create the table. The table name can be anything and the location can be anywhere you would like:
Grant the SELECT
privilege on this table to the ACCOUNTADMIN
role using the following: