MaxCompute provides a comprehensive data import scheme that supports the fast computing of large amounts of data.

Prerequisites

A reader or conversion node is configured. For more information, see Supported synchronization methods, sources, and destinations.

Procedure

  1. Go to the DataStudio page.
    1. Log on to the DataWorks console.
    2. In the left-side navigation pane, click Workspaces.
    3. Select the region where the required workspace resides, find the workspace, and then click Data Analytics.
  2. Move the pointer over the Create icon and choose Data Integration > Real-time synchronization.
    Alternatively, you can click the required workflow, right-click Data Integration, and then choose Create > Real-time synchronization.
  3. In the Create Node dialog box, set the Node Name and Location parameters.
    Notice The node name must be 1 to 128 characters in length. It can contain letters, digits, underscores (_), and periods (.).
  4. Click Commit.
  5. On the configuration tab of the real-time sync node, drag MaxCompute in the Output section to the canvas on the right. Connect the MaxCompute node to the configured reader or conversion node.
  6. Click the MaxCompute node. In the Node configuration panel, set the parameters. The following table describes the parameters.
    MaxCompute
    Parameter Description
    Data source The MaxCompute data source that you configured. You can select only a MaxCompute data source.

    If no data source is available, click New data source on the right to add a data source on the Data Source page. For more information, see Add a MaxCompute data source.

    Table The name of the MaxCompute table to which you want to write data.
    You can click Create Table on the right to create a table, or click Data preview to preview the selected table.
    Notice Before you create a table, connect the MaxCompute node to a reader node and make sure that the output fields are specified for the reader node.
    Mode The mode in which data is written to the destination partitions of the MaxCompute table. Valid values: Partitioning by Time and Dynamic Partitioning by Field Value. If you select Partitioning by Time, data is written to the destination partitions of the MaxCompute table based on the value of the _execute_time_ field. For more information, see Fields used for real-time synchronization. If you select Dynamic Partitioning by Field Value, data is dynamically written to the destination partitions of the MaxCompute table based on the value of a specified field in the source table after the mapping between the specified field in the source table and the specified partition field in the MaxCompute table is defined.
    Partition message The information about the partitioned MaxCompute table.
    Field Mapping The field mappings between the source and destination. Click Field Mapping to configure field mappings. The real-time sync node synchronizes data based on the field mappings.
    If you want to create a table, click Create Table next to Table. In the New data table dialog box, set the parameters. The following table describes the parameters. Create Table
    Parameter Description
    Table name The name of the MaxCompute table to which you want to write data in real time.
    Life cycle The lifecycle of the MaxCompute table. For more information, see Lifecycle.
    Data field structure The fields of the MaxCompute table. To add a field, click New field.
    Partition settings The partition information of the MaxCompute table. You can select Partitioning by Time or Dynamic Partitioning by Field Value as the partitioning mode.
    • Partitioning by Time: Data is written to the destination partitions of the MaxCompute table based on the value of the _execute_time_ field. For more information, see Fields used for real-time synchronization.Partitioning by Time
      Notice
      • You must configure at least two levels of partitions, which are yearly and monthly partitions. You can configure a maximum of five levels of partitions, which are yearly, monthly, daily, hourly, and minutely partitions.
      • For more information about MaxCompute tables, see Partition.
    • Dynamic Partitioning by Field Value: Data is dynamically written to the destination partitions of the MaxCompute table based on the value of a specified field in the source table after the mapping between the specified field in the source table and the specified partition field in the MaxCompute table is defined. Dynamic Partitioning by Field ValueFor example, the value of Field A in the source table is defined as the value of the partition field in the MaxCompute table. If the value of Field A in a record is aa, this record is written to the aa partition of the MaxCompute table. If the value of Field A in a record is bb, this record is written to the bb partition of the MaxCompute table.
  7. Click the Save icon in the toolbar.