Skip to main content

Configuring Metric Sources for Warehouse Native Experimentation

Overview

When creating or editing a Metric Source in the FME Settings page, 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.

After setting up Metric Sources, you can create metric definitions to aggregate event data by type (i.e., count, sum, or average). With Metric Sources configured, your metrics remain consistent, standardized, and reusable across experiments and analyses.

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

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.

Once you've set up the metric sources that best fit your workflow, you can manage them directly 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.

Troubleshooting

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.