Creating and managing assignment data sources
This topic explains how to create and manage assignment data sources.
Create assignment data sources
When you create an assignment data source, you write a query against your warehouse and map the columns it returns to the fields LaunchDarkly needs to analyze an experiment.
To create an assignment data source:
- Open the Data section and click Data sources.
- Click the Assignments tab.
- Click Create source.
- Enter a Name and Key in the “Name your assignment data source” section.
- (Optional) Add a Description.
- Click Select warehouse integration in the “Connect and query your assignment data” section and choose the integration for a specific LaunchDarkly project and environment.
- Select an input method of Query or Table.
- If you selected Query, enter a SQL query in the Enter SQL query to fetch columns field to return the assignment events you want to include in this data source.
- If you selected Table, enter a table.
- Click Run query. The results appear in the “Preview results” table.
- Map the columns your query returned to LaunchDarkly fields in the “Map your assignment data to LaunchDarkly” section:
- Experiment ID: Choose the column containing the experiment identifier.
- Variant ID: Choose the column containing the variant identifier.
- Context kind: Choose a column of unique identifiers in the “Unit identifier” menu, then choose the LaunchDarkly context kind to map it to.
- (Optional) Click Add another to map an additional identifier and context kind pair.
- Timestamp: Choose the column containing the time each exposure occurred.
- Click Save.
Edit assignment data sources
Editing an assignment data source affects every experiment that uses it. If a data source is already in use, LaunchDarkly warns you and lists the experiments created from it before you save your changes.
To edit an existing assignment data source:
- Open the Data section and click Data sources.
- Click the Assignments tab.
- Click the three-dot overflow menu for the data source you want to edit, then select Edit configuration.
- Make any changes as needed and click Save.
Archive assignment data sources
You can archive an assignment data source when you no longer need it. Archiving an assignment data source does not make changes to the warehouse integration it is linked to.
To archive an assignment data source:
- Open the Data section and click Data sources.
- Click the Assignments tab.
- Click the three-dot overflow menu for the data source you want to archive.
- Select Archive.
To view archived data sources, click the Type menu and select Archived.
Build experiments using assignment data sources
To build an experiment using an assignment data source, follow the experiment creation instructions for warehouse native experiments.
You must select a warehouse native metric in the metric selection step and a warehouse assignment source from the Assignment method menu.
Customize the assignment date range
By default, LaunchDarkly analyzes all the assignment data your query returns. You can narrow the analysis to a specific window, which is useful when your table contains historical assignments from experiments that have already concluded.
To set a date range:
- Check Assignment data start date in the “Customize assignment date range” section.
- Choose a date and enter a Start time.
- (Optional) Check Assignment data end date, then choose a date and enter an End time.
If you leave the start date blank, LaunchDarkly includes all the assignment data available in your table. If you leave the end date blank, LaunchDarkly continues to query for new assignment data until you stop the experiment.
Assignment data size limits
Before LaunchDarkly starts an experiment iteration, it checks how much data your configuration would query. If the volume is too large, LaunchDarkly either warns you or prevents the iteration from starting.
These are the thresholds:
If your configuration exceeds a warning threshold, you can start the iteration, but analysis takes longer than usual. If it exceeds a hard limit, you cannot start the iteration. To reduce the volume, narrow the date range or reduce the size of your assignment data source.
These limits apply only to assignment data sources. Metric data sources do not have equivalent limits.