This topic explains how to create metric data sources for warehouse native metrics.
Metric data sources allow you to bring multiple data tables directly from your external warehouse into LaunchDarkly, without requiring you to centralize your data in a single, all-events table. This lets you add multiple tables as a data source to better match how you have organized your data warehouse.
To create a metric data source in the LaunchDarkly UI:
If you are using Snowflake, you must have the LD_DATA_SOURCE_ROLE role in Snowflake. You create this role when you set up the Snowflake Native Experimentation integration. If you modify the native-app-provided SQL before you run it, be sure that this role has read-only access to your metric events tables, schemas, and databases, and no other resources.
When LaunchDarkly calculates your experiment results, it will execute your data source query using the role LD_EXPERIMENTATION_ROLE.
When you create a new metric data source from your warehouse tables, you must map your warehouse table columns to the schema that LaunchDarkly needs to create a metric and run an experiment.
To create a data source:
purchase or button click, an event value (can be null), and at least one column identifying the event’s context, such as user_id or device_id.order_amount, or 1 for conversion events.purchase, add to cart, or page view.You can archive a data source when you no longer need it. Archiving a metric data source does not make changes to the warehouse integration it is linked to.
To archive a data source: