Assignment SQL
When you write an Assignment SQL, you're defining which entities will be assigned to which experiment and variation, and at what time.
You can optionally include any dimensions that you want to be able to slice/dice the analysis by.
SELECT
ts_assigned,
experiment_name,
variant_name,
user_id,
browser,
device_type
FROM mydb.myschema.assignments
In this example, user_id
is assigned to experiment_name
in the variant_name
treatment group.
Creating an Assignment SQL
- Navigate to Definitions and click Create Definition SQL
- Click Assignment SQL
- Select the subject of the Assignment SQL
Entities are the randomization units of your experiment. By default, entities in Eppo are User, but you can also create your own customized entities and attach Assignment SQL's to them.
Name your Assignment SQL
Write SQL in the SQL editor to pull assignments from data warehouse and click Run
Recall tht you should have an assignment table in your data warehouse with certain column types.
In this step, you're going to write SQL to pull that data.
Then click Run, and the rows from that assignment table should appear in the bottom left.
- Annotate the columns that you've selected from the data warehouse
In case there's any ambiguity as to which properties the columns correspond to, we annotate them here.
- Make note of your feature flag name and variant names
Note the value of the FEATURE FLAG column; in this example it's new_user_onboarding
- this is your feature flag name.
Note the values of the VARIANT column; in this example it's control
and treatment
- these are the names of your variants.
You will need these names later.
- Adding optional dimensions
Your feature flag tooling may have logged additional data about the user, like what country they're from or which browser they're using. You can annotate these additional dimensions here, and they will show up under the Dimension SQL tab.
- Click Save & Close