- Create an entity that represents the users that are part of your experiments.
- Create an assignment table that tells Confidence how your entity is assigned to experiments.
- Create a fact table that makes some measurable facts available for metrics.
- Create a metric that aggregates a measurement from the fact table.
- Data Engineers or Data Scientists who want to set up Confidence Metrics for their organization.
- You need to have a Confidence account.
- (Step 2-3) You need to have connected Confidence Metrics to your data warehouse.
- (Step 2-3) You need to have data for metrics in your data warehouse.
Create an Entity
An entity is a representation of the users that are part of your experiments. Entities can be anything really, but typically they are users, customers, or visitors. In Confidence, the entity connects other concepts such as experiments, variants, facts, dimensions and metrics to each other. It’s via the entity that Confidence can understand how it should traverse the data in your data warehouse. For example, when you configure an experiment to use theUser entity, Confidence only considers metrics that use facts that
have a relationship to the User entity.
Confidence comes with two default entities: User and Visitor. If you want to
experiment on and create metrics for another entity, follow these steps.
Go to Confidence
Navigate to Entities
Click + Create
Enter User as the name of the entity
Select a data type
String.Click Create
Create an Assignment Table
- A timestamp that indicates when the assignment happened.
- An entity identifier, normally a user identifier, that uniquely identifies the user that was assigned a variant.
- An experiment identifier that identifies the experiment that the user was assigned to.
- A variant identifier that identifies the variant that the user was assigned to.
assignment_log in your data warehouse.
Data should be continuously appended to the table as users are assigned to experiments.
The table has the following schema:
Go to Confidence
Navigate to Assignment tables
Click + Create
Give the table a name
assignment. If your data comes from a particular feature flagging system, you can name it after that, for example launchdarkly.Enter the SQL query
Click Run Query
LIMIT clause to limit the number of rows.Map the columns
timestampas the timestamp column.- For entity, select
Userand enteruser_idas the entity column. experiment_idas the experiment key column.variant_idas the variant key column.
Configure data delivery cadence
Data is delivered continuously. Leave Commit delay at its default value. You can read more about these settings on the data delivery cadence page.Click Create
Create a Fact Table
Facts are measurable data that you want to use in your metrics. Facts can be anything that you can measure, such as revenue, number of clicks, or number of impressions. Facts are stored in tables in your data warehouse. For Confidence to understand the data, you need to tell Confidence where to find it and how to interpret it. This tutorial assumes you have your fact data in a table calledsales in your data warehouse. Each time a sale occurs, the system adds a new
row to the data. amount is the sales amount and product is the product sold.
Assume that data is continuously appended to the table as sales happen.
The table has the following schema:
Go to Confidence
Navigate to Fact tables
Click + Create
Give the table a name
sales.Enter the SQL query
Click Run Query
Map the columns
- Select
timestampas the timestamp column. - For entity, select
Userand selectuser_idas the entity column. - Add
amountto the list of measurements. - Add
productto the list of dimensions.
Configure data delivery cadence
Data is delivered continuously. Leave Commit delay at its default value. You can read more about these settings on the data delivery cadence page.Click Create
Create a Metric
The final step is to create a metric that aggregates the fact data. A metric can be any aggregation of the fact data, such as sum, average, count, etc. All metrics aggregate measurements over some time window. Watch the following video for a 4-minute overview of the different ways to handle time in metrics.Go to Confidence
Navigate to Metrics
Click + Create
Enter metric details
Average weekly sales per user as the name of the metric and assign yourself as the owner. Skip the description for now.Select Consumption as the metric type
Select the consumption value
User entity, the sales fact table, and the amount measurement as the Consumption value.Add attribute criteria
content_type as the attribute. Set the filter to content_type is podcast.Configure when to include users
Cumulatively during a window and 1 week starting at exposure.Click Next to skip the Suggested usage
Review and create

