This topic describes the Append ID Column component provided by Machine Learning Studio. This component allows you to append an ID column to the first column of a data table.

Background information

The Append ID Column component can be used for the data tables that have a maximum of 1000000000 x 1023 rows.

Configure the component

You can configure the component by using one of the following methods:
  • Machine Learning Platform for AI console
    Tab Parameter Description
    Parameters Setting All checked by default. By default, all columns are selected. Extra columns do not affect prediction results.
    ID Column The default value of this parameter is append_id.
    Tuning Number of Computing Cores
    Memory Size per Core
  • PAI command
    PAI -name AppendId
        -project algo_public
        -DinputTableName=maple_test_appendid_basic_input
        -DoutputTableName=maple_test_appendid_basic_output;
    Parameter Required Description Default value
    inputTableName Yes The name of the input table. No default value
    selectedColNames No The names of the columns selected from the input table for training. Column names are separated by commas (,). The names of the INT and DOUBLE types are supported. If the names are in sparse format, columns of the STRING type are supported. All columns
    inputTablePartitions No The partitions in the input table for training. The following formats are supported:
    • Partition_name=value
    • name1=value1/name2=value2: multiple-level partitions
    Note If you specify multiple partitions, separate these partitions with commas (,).
    All partitions
    outputTableName Yes The name of the output table. No default value
    IDColName No The name of the appended ID column. append_id
    lifecycle No The lifecycle of the output table. No default value
    coreNum No The number of cores. Automatically allocated
    memSizePerCore No The memory size of each core. Automatically allocated

Example

PAI -name AppendId
    -project algo_public
    -DinputTableName=maple_test_appendid_basic_input
    -DoutputTableName=maple_test_appendid_basic_output;
  • Generated data
    col0 col1 col2 col3 col4
    10 0.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    11 1.0 aaaa Thu Oct 01 00:00:00 CST 2015 false
    12 2.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    13 3.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    14 4.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
  • Output table
    append_id col0 col1 col2 col3 col4
    0 10 0.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    1 11 1.0 aaaa Thu Oct 01 00:00:00 CST 2015 false
    2 12 2.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    3 13 3.0 aaaa Thu Oct 01 00:00:00 CST 2015 true
    4 14 4.0 aaaa Thu Oct 01 00:00:00 CST 2015 true