> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating and managing assignment data sources

<View title="Developer" />

<View title="Federal docs">
  <Danger>
    **Experiments using warehouse native metrics are not available in federal environments**

    To learn more, read <a href="/docs/home/infrastructure/federal">LaunchDarkly in federal environments</a>.
  </Danger>
</View>

<View title="EU docs" />

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:

1. Open the **Data** section and click **Data sources**.
2. Click the **Assignments** tab.
3. Click **Create source**.
4. Enter a **Name** and **Key** in the "Name your assignment data source" section.
5. (Optional) Add a **Description**.
6. Click **Select warehouse integration** in the "Connect and query your assignment data" section and choose the integration for a specific LaunchDarkly project and environment.
7. 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.
8. Click **Run query**. The results appear in the "Preview results" table.
9. 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.
10. 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:

1. Open the **Data** section and click **Data sources**.
2. Click the **Assignments** tab.
3. Click the **three-dot** overflow menu for the data source you want to edit, then select **Edit configuration**.
4. 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:

1. Open the **Data** section and click **Data sources**.
2. Click the **Assignments** tab.
3. Click the **three-dot** overflow menu for the data source you want to archive.
4. 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](/docs/home/warehouse-native/creating) 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:

1. Check **Assignment data start date** in the "Customize assignment date range" section.
2. Choose a date and enter a **Start time**.
3. (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:

<table>
  <thead>
    <tr>
      <th>Condition</th>
      <th>Warning threshold</th>
      <th>Hard limit</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Rows in the configured date range</td>
      <td>10,000,000</td>
      <td>500,000,000</td>
    </tr>

    <tr>
      <td>Query duration</td>
      <td>30 seconds</td>
      <td>180 seconds</td>
    </tr>
  </tbody>
</table>

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](/docs/home/warehouse-native/metric-data-sources) do not have equivalent limits.
