All Products
Search
Document Center

Platform For AI:Percentile

Last Updated:Apr 01, 2026

The Percentile component computes 101 quantile values (0th through 100th percentile) for one or more columns in a MaxCompute table. Use it to understand data distribution before training, detect outliers in feature columns, or prepare data for downstream normalization steps.

Limitations

  • Supported column types: BIGINT, DOUBLE, and DATETIME only.

  • Null values in a column are skipped during calculation.

  • If all of the columns contain only null values, an error is returned.

Configure the component

Method 1: Configure on the pipeline canvas

Open the Percentile component in Machine Learning Designer (formerly Machine Learning Studio) and set the following parameters.

Parameters Setting tab

ParameterDescription
Input ColumnsClick Select Column to choose the columns to compute percentiles for.

Tuning tab

ParameterDescription
Number of CoresThe number of cores allocated to the job.
Memory Size per CoreThe memory allocated to each core.

Method 2: Use PAI commands

Run the following command using the SQL Script component.

PAI -name Percentile
     -project algo_public
     -DinputTableName=maple_test_percentile_3col_input
     -DcolName=col0,col1,col2 -DoutputTableName=maple_test_percentile_3col_output;

Required parameters

ParameterDescription
inputTableNameName of the input table.
outputTableNameName of the output table.

Optional parameters

ParameterDescription
colNameNames of the columns to compute. Default: all columns. Separate multiple column names with commas (,).
inputPartitionsPartitions in the input table. Default: all partitions. Format: partition_name=value for a single partition, name1=value1,name2=value2 for multiple partitions, or name1=value1/name2=value2 for multi-level partitions.
predictInputTableNameName of the prediction table. When set, the component generates a prediction result.
predictInputTablePartitionsPartitions in the prediction table.
predictSelectedColNamesColumn names to use from the prediction table. Default: all columns. Column names must match those in the training table.
predictSelectedOriginalColNamesColumn names whose data to retain in the output. Default: all columns. Separate multiple names with commas (,).
predictOutputTableNameName of the output prediction table. Used with predictInputTableName.
lifecycleLifecycle of the output table. Default: no lifecycle. Must be a positive integer.
coreNumNumber of cores. Valid values: 1–9999. Must be a positive integer. Used with memSizePerCore.
memSizePerCoreMemory per core, in MB. Valid values: 1024–65536. Must be a positive integer.

Example

Input table: maple_test_percentile_3col_input

col0:double (1000 rows)col1:bigint (100 rows)col2:bigint (300 rows)
96288Tue Oct 15 00:26:40 CST 1974
21899Thu Jan 04 20:53:20 CST 1973
56544Sat Mar 09 02:40:00 CST 1974
31468Mon Aug 11 22:40:00 CST 1975
58313Sat Aug 23 12:26:40 CST 1975
61587Tue May 25 14:13:20 CST 1971
7053Fri Mar 23 09:20:00 CST 1979
92963Mon Jul 03 16:26:40 CST 1972
24948Thu Mar 15 07:33:20 CST 1973
42862Wed Mar 17 03:33:20 CST 1971
1191Thu Jun 26 15:33:20 CST 1975
75627Mon Jan 30 17:20:00 CST 1978
49075Wed Dec 11 21:20:00 CST 1974
95712Sun Jul 05 12:26:40 CST 1970
8022Wed Oct 04 06:40:00 CST 1972
68157Wed Nov 03 15:06:40 CST 1971
1395Sat Sep 12 23:06:40 CST 1970

PAI command

PAI -name Percentile
     -project algo_public
     -DinputTableName=maple_test_percentile_3col_input
     -DcolName=col0,col1,col2 -DoutputTableName=maple_test_percentile_3col_output;

Output table: maple_test_percentile_3col_output

The output table has one row per percentile rank (0–100). The quantile column holds the rank; each input column holds the corresponding percentile value. To find the 95th percentile of col0, locate the row where quantile = 95.

quantile:bigintcol0:doublecol1:bigintcol2:datetime
00.00Thu Jan 01 08:00:00 CST 1970
19.00Sat Jan 24 11:33:20 CST 1970
219.01Sat Feb 28 04:53:20 CST 1970
329.02Fri Apr 03 22:13:20 CST 1970
439.03Fri May 08 15:33:20 CST 1970
549.04Fri Jun 12 08:53:20 CST 1970
659.05Fri Jul 17 02:13:20 CST 1970
769.06Thu Aug 20 19:33:20 CST 1970
879.07Thu Sep 24 12:53:20 CST 1970
989.08Thu Oct 29 06:13:20 CST 1970
1099.09Wed Dec 02 23:33:20 CST 1970
11109.010Wed Jan 06 16:53:20 CST 1971
12119.011Wed Feb 10 10:13:20 CST 1971
13129.012Wed Mar 17 03:33:20 CST 1971
14139.013Tue Apr 20 20:53:20 CST 1971
15149.014Tue May 25 14:13:20 CST 1971
16159.015Tue Jun 29 07:33:20 CST 1971
............
84839.083Thu Dec 15 10:13:20 CST 1977
85849.084Thu Jan 19 03:33:20 CST 1978
86859.085Wed Feb 22 20:53:20 CST 1978
87869.086Wed Mar 29 14:13:20 CST 1978
88879.087Wed May 03 07:33:20 CST 1978
89889.088Wed Jun 07 00:53:20 CST 1978
90899.089Tue Jul 11 18:13:20 CST 1978
91909.090Tue Aug 15 11:33:20 CST 1978
92919.091Tue Sep 19 04:53:20 CST 1978
93929.092Mon Oct 23 22:13:20 CST 1978
94939.093Mon Nov 27 15:33:20 CST 1978
95949.094Mon Jan 01 08:53:20 CST 1979
96959.095Mon Feb 05 02:13:20 CST 1979
97969.096Sun Mar 11 19:33:20 CST 1979
98979.097Sun Apr 15 12:53:20 CST 1979
99989.098Sun May 20 06:13:20 CST 1979
100999.099Sat Jun 23 23:33:20 CST 1979