All Products
Search
Document Center

Platform For AI:Register a source table

Last Updated:Aug 28, 2026

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

user_id

STRING

A user identifier, such as a user UID, device ID, or IMEI.

Yes

exp_id

STRING

The experiment ID returned by PAI-ABTest and collected through event tracking. For example, ER8_E6#EV12.

Yes

calculated field

A numeric type, such as BIGINT, INT, or FLOAT.

A user-defined calculated field, such as view count (show_cnt) or click count (click_cnt).

Yes

dt

STRING

Date partition in the yyyyMMdd format.

Yes

hh

STRING

Hour partition in 24-hour format. Valid values: 00 to 23.

No

mm

STRING

Minute partition. Valid values: 00 to 59.

No

You can generate source table data in one of the following ways:

  • Offline output: Must include the user_id, exp_id, and dt fields.

  • Real-time output: Must include the user_id, exp_id, dt, and hh fields. The mm field 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

  1. Go to the ABTest page.

    1. Log on to the PAI console.

    2. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

    3. In the left-side navigation pane, choose Model Deployment > PAI-ABTest.

  2. In the left-side navigation pane of the PAI-ABTest page, choose Metric Management > Data Table.

  3. 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.

    Note

    The MaxCompute table must contain the user_id, exp_id, and dt fields.

  4. 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.