Register a source table for PAI-ABTest to visually monitor experiment results and metric data.
Background information
After your application generates behavior logs, event tracking sends the data to a MaxCompute log table, which serves as the source table. You can register this table with PAI-ABTest and define metrics by using calculated fields. The system then calculates metrics hourly or daily based on the table's partition information. For more information about the overall workflow of PAI-ABTest experiments, see Architecture of ABTest.
Prepare a source table
The source table must contain the following fields. For more information about how to create a table, see Create tables.
|
Parameter |
Type |
Description |
Required |
|
|
STRING |
A user identifier, such as a user UID, device ID, or IMEI. |
Yes |
|
|
STRING |
The experiment ID returned by PAI-ABTest and collected through event tracking. For example, |
Yes |
|
calculated field |
A numeric type, such as BIGINT, INT, or FLOAT. |
A user-defined calculated field, such as view count ( |
Yes |
|
|
STRING |
Date partition in the |
Yes |
|
|
STRING |
Hour partition in 24-hour format. Valid values: |
No |
|
|
STRING |
Minute partition. Valid values: |
No |
You can generate source table data in one of the following ways:
-
Offline output: Must include the
user_id,exp_id, anddtfields. -
Real-time output: Must include the
user_id,exp_id,dt, andhhfields. Themmfield is optional.
If the hh partition field is included, metrics are calculated both hourly (the system collects statistics every 5 minutes) and daily. If only the dt partition field is included, metrics are calculated only daily.
Register the table
-
Go to the ABTest page.
Log on to the PAI console.
In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.
In the left-side navigation pane, choose .
-
In the left-side navigation pane of the PAI-ABTest page, choose .
-
On the Data Table page, click Registration Data Table. On the Registration Data Table page, configure the following parameters.
Parameter
Description
Name
A custom name for the table.
Description
A detailed description of the table.
MaxCompute Project
Select an existing MaxCompute project.
MaxCompute Table
Select an existing MaxCompute table. The system automatically imports the field information and displays it in the Data Fields section. If the field information is incorrect, click Import Again to import the fields again.
NoteThe MaxCompute table must contain the
user_id,exp_id, anddtfields. -
After confirming the field information is correct, click OK to register the table.
Related documents
After registering the source table, create an experiment metric to define calculation logic. For more information, see Create an experiment metric.