Skip to main content

Setup

Overview

This page explains how to prepare your assignment and metric source tables, configure assignment and metric sources, and defining your metrics and experiments.

  • An assignment source defines how Harness FME should read impression/exposure events from your data warehouse and map them to experiments. It ensures that users are correctly assigned to treatments, environments, and traffic types, enabling accurate metric analysis across experiments.
  • A metric source defines how Harness FME reads and interprets raw event data from your warehouse. It ensures that metric events are correctly captured, timestamped, scoped to environments and traffic types, and made available for metric definitions.

Prepare assignment and metric source tables

Configure an assignment source

When creating or editing an Assignment Source in the Harness FME UI, you have two options for defining the assignment source table: Table name or SQL query.

Select a table

info

Recommended if your data is already modeled into a clean impression/exposure table.

  1. Select an existing table name directly from the schema.
  2. Click Test connection to validate that Harness can query the table successfully before continuing.

With Assignment Sources configured, you can can confidently create experiments, knowing all exposures are correctly captured, standardized, and reusable across analyses.

Harness FME will preview the query output so you can confirm the correct fields are returned.

Add field mappings

Define the following fields from your assignment source to Harness FME:

FieldDescription
Unique IdentifierMaps to the column representing the unique key for user, account, or entity.
Impression TimestampMaps to the column representing when the user was assigned to a treatment.
TreatmentMaps to the column that stores the treatment or experiment variant (e.g., control, variant_a).

Configure your environments

Select an environment column and map its values to Harness FME environments.

For example, select the ENV_NAME column and map its values (US-Prod, UK-Prod) to your Harness project’s Production environment and map the Stg values (US-Stg, UK-Stg) to your Harness project’s Staging environment.

This allows a single Assignment Source to span multiple environments.

Configure your traffic types

Similar to environments, traffic types can be set up in two ways:

Select a traffic type column (e.g., ttid) and map its values to Harness FME traffic types (e.g., user, account, or anonymous).

This is recommended if the same Assignment Source covers multiple population types.

Additional configuration options

  • Preview data: Harness shows a preview of the data returned from your table or query so you can validate that the expected rows and columns are present.
  • Owners: Assign one or more owners to make clear who is responsible for maintaining the Assignment Source.
  • Tags: Add tags (e.g., by team, environment, or use case) to make sources easier to discover and organize.

Manage assignment sources

Assignment Sources can be reusable and standardized, or tailored to individual experiments depending on your organization’s needs:

  • Reusable, standardized sources are recommended if you have a general impressions/exposures table.

    This approach makes setup faster and consistent across teams. Be mindful of potential query processing speed and warehouse costs when working with very large shared tables.

  • Custom per-experiment sources are recommended if you want to scope data more tightly for privacy, relevancy, or performance.

    Limits experiment creators to a specific subset of data, reducing query volume and potential data access concerns.

Ultimately, it’s up to your organization whether to centralize around a single reusable source or create smaller, experiment-specific sources. Many teams use a mix of both strategies depending on scale and governance needs.

You can edit and delete assignment sources in Harness FME.

  • Edit: You can update the table reference, query, or mappings as your data model evolves. Changes to an existing Assignment Source may disrupt any experiments that are actively using it.
  • Delete: Remove outdated or misconfigured sources to reduce clutter and prevent accidental use.

Configure a metric source

Metric Sources are building blocks: once created, you can reuse them to define consistent, standardized metrics across multiple experiments.

When creating or editing a Metric Source, you have two options for defining the metric source table: Table name or SQL query.

Select a table

info

Recommended if your event data is already modeled into a clean event table.

  1. Select an existing table name directly from the schema.
  2. Click Test connection to validate that Harness can query the table successfully before continuing.

Harness FME will show a data preview so you can confirm the expected fields are returned.

After setting up Metric Sources, you can create metric definitions to aggregate event data by type (i.e., count, sum, or average).

Configure your environments

Select an environment column and map its values to Harness FME environments.

For example, select the ENV_NAME column and map its values (US-Prod, UK-Prod) to your Harness project’s Production environment and map the Stg values (US-Stg, UK-Stg) to your Harness project’s Staging environment.

This is recommended if a single metric source spans multiple environments.

Configure your traffic types

Similar to environments, traffic types can be set up in two ways:

Select a traffic type column (e.g., ttid) and map its values to Harness FME traffic types (e.g., user, account, or anonymous).

This is recommended if the same Metric Source covers multiple population types.

Configure events

Metric Sources allow flexibility in how event types are set up.

Select an event type column (e.g., EVENT_NAME) so the metric source can be reused across multiple metric definitions.

This is recommended for general-purpose event sources.

Additional configuration options

  • Preview data: Harness shows a preview of the data returned from your table so you can validate that the expected rows and columns are present.
  • Owners: Assign one or more owners to make clear who is responsible for maintaining the Metric Source.
  • Tags: Add tags (e.g., by team, environment, or use case) to make sources easier to discover and organize.

Manage metric sources

In order to maintaining general-purpose reusable sources while also creating custom sources for sensitive or high-volume use cases, you can adopt a hybrid approach:

  • Reusable, standardized sources are recommended if you want one source to power many metric definitions (e.g., a general events table with filtering by event type).
  • Custom sources are useful if you want to tightly scope data for privacy, relevancy, or performance.

You can edit and delete metric sources in Harness FME.

  • Edit: Update the query, mappings, or field configuration to align with schema changes in your warehouse. Changes may disrupt metrics or experiments relying on this source.
  • Delete: Remove unused or invalid sources to prevent accidental use. Before deletion, confirm no metric definitions depend on the source.

Create and run experiments

Once you've configured assignment and metric sources in Harness FME, you can create metrics and start running experiments in your data warehouse. For more information, see Create a metric.

Troubleshooting

Assignment sources

If you encounter issues when configuring an Assignment Source:

Test Connection or Run Query Fails
  1. Ensure your table or SQL query is valid and accessible with the credentials tied to your warehouse connection.

  2. Check that you have permission to query all referenced schemas/tables.

  3. Verify that the schema and table names are spelled correctly.

No Data Appears in Preview

If you are using a SQL query, try running it directly in your warehouse to confirm output.

Column Not Detected or Missing

Verify that your source table/query outputs the required columns: unique identifier, timestamp, and treatment.

Incorrect Environment or Traffic Type Mapping
  1. Double-check that each warehouse value (e.g., UK-Prod) is mapped to the correct Harness environment (e.g., Production).
  2. If everything should map to one environment or type, consider using the hardcoded value option instead of column mapping.
Assignment Source Not Showing in Experiment Setup
  1. Make sure you clicked Save after configuration.
  2. Confirm that the source hasn’t been deleted, disabled, or restricted to owners only.

Metric sources

If you encounter issues when configuring a Metric Source:

Test Connection or Run Query Fails
  1. Ensure the table or query is valid and accessible with your warehouse connection credentials.
  2. Verify that schemas and table names are spelled correctly.
No Data Appears in Preview
  1. Confirm the query/table returns rows for the event(s) you expect.
  2. If you are using event filtering in SQL, test the query directly in your warehouse.
Missing Columns

Verify that the required fields exist and are returned by your query.

Timestamp Format Issues

Ensure event timestamps are in a supported TIMESTAMP or DATETIME format.

If you are using epoch values (e.g., EVENT_TIMESTAMP_MS), convert them in your SQL query.

Incorrect Environment/Traffic Type Mapping
  1. Check that each warehouse value is mapped to the intended Harness environment or traffic type.
  2. Use hardcoded values if everything should map to a single option.
Unable to Delete Source

Check which metric definitions are currently using it. Delete or reassign those metrics before removing the source.