Purpose :
- Design the experiment definition metadata schema
- Data product design to populate experiment data for the experiments
Design Flow :
Experiment Definition Schema:
Field | type | Description | |
---|---|---|---|
1 | experiment_id | String | unique id for experiment |
2 | experiment_name | String | name of the experiment |
3 | client | String | experiment channel(portal/app/Desktop) |
4 | start_date | Timestamp | start date of the experiment |
5 | end_date | Timestamp | end date of the experiment |
6 | user_count | Long | no of users mapped to the experiment |
7 | device_count | Long | no of devices mapped to the experiment |
8 | experiment_mapped | Boolean | flag to check if the experiment is already mapped |
9 | udpated_on | Timestamp | last udpated by the experiement data product |
10 | status | String | status of the experiment(active/inactive) |
11 | status_message | String | status description of the experiment |
12 | created_by | String | name of the user who created the experiment |
Experiment Data Product :
Purpose
- To compute the user experiment mapping based on the experiment criteria and save it to elastic search
Inputs
- Experiment_Definition Cassandra Table
- Experiment Criteria Config
User Criteria Config
UserCriteriaConfig
{ "experiments": [ { "exp_id": { "criteria": { "type": "user", "channel": "app/portal/desktop", "request": { "filters": { "organisations.orgName": [ "sunbird" ], "framework.board": [ "CBSE" ] } } } } }, { "exp_id": { "criteria": { "type": "user", "channel": "app/portal/desktop", "request": { "filters": { "emailVerified": true } } } } } ] }
Note : Currently all the filters are included as "AND" condition
Device Criteria Config
DeviceCriteriaConfig
{ "exp_id": { "criteria": { "type": "device", "channel": "app/portal/desktop", "request": { "filters": [ { "name": "state", "operator": "IN", "value": [ "Karnataka" ] }, { "name": "first_access", "operator": "GT", "value": "2019-07-17" } ] } } } }
Output : User experiment mappingĀ index to elastic search
Experiment Index
User Experiment : { "name" : "USER_ORG", "expType" : "user", "lastUpdatedOn" : "2019-07-30T00:00:00", "endDate" : "2019-07-28T00:00:00", "url" : null, "deviceIdMod" : 0, "key" : "2392438420", "id" : "A1234", "userIdMod" : 0, "userId" : "d5fd92df-2683-4357-8620-45bc0683f38c", "platform" : "portal", "deviceId" : null, "startDate" : "2019-07-25T00:00:00" } Device Experiment : { "name" : "DEVICE_LOCATION", "expType" : "device", "lastUpdatedOn" : "2019-07-30T00:00:00", "endDate" : "2019-08-30T00:00:00", "url" : null, "deviceIdMod" : 0, "key" : "4584583045489", "id" : "B1534", "userIdMod" : 0, "userId" : null, "platform" : "app", "deviceId" : "3f3da025f07f2d6e4ead9042710b8b78", "startDate" : "2019-07-29T00:00:00" }