All Products
Search
Document Center

Dataphin:Configure PolarDB-X 2.0 input component

Last Updated:Nov 03, 2026

The PolarDB-X 2.0 input component reads data from a PolarDB-X 2.0 data source. To synchronize data to a destination, configure this component for the source and the appropriate component for the destination. This topic describes how to configure the PolarDB-X 2.0 input component.

Prerequisites

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Integration.

  2. In the top navigation bar, select a Project. If you are in Dev-Prod mode, you must also select an environment.

  3. In the left-side navigation pane, click Batch Integration. In the Batch Integration list, click the batch pipeline to open its configuration page.

  4. In the upper-right corner of the page, click Component Library to open the Component Library panel.

  5. In the left-side navigation pane of the Component Library panel, select Input. Find the PolarDB-X 2.0 component in the list on the right and drag it to the canvas.

  6. Click the image icon on the PolarDB-X 2.0 input component card to open the PolarDB-X 2.0 Input Configuration dialog box.

  7. In the PolarDB-X 2.0 Input Configuration dialog box, configure the following parameters.

    Parameter

    Description

    Step name

    The name of the PolarDB-X 2.0 input component. Dataphin automatically generates a step name, which you can modify based on your business requirements. The name must meet the following requirements:

    • Can contain only letters, digits, underscores (_), and Chinese characters.

    • Cannot exceed 64 characters in length.

    Source table mode

    Select the source table mode. Options include single table and multiple table.

    • single table: Use this option to synchronize data from one source table to one destination table.

    • multiple table: Use this option to synchronize data from multiple source tables to a single destination table. When you write data from multiple tables to a single table, a union operation is performed.

      For more information about the union operation, see INTERSECT, UNION, and EXCEPT.

    Data source

    The data source dropdown list displays all PolarDB-X 2.0 data sources, including those with and without read permission for data synchronization. Click the image icon to copy the current data source name.

    Database (optional)

    Select the database where the source tables are located. If you leave this parameter empty, the system uses the database specified during data source registration.

    If source table mode is set to multiple table, you can select multiple databases. Click theimage icon. In the Database List dialog box, you can view all selected databases.

    Table matching method

    You can select General Rule or database regular expression.

    Note

    This parameter can be configured only when source table mode is set to multiple table.

    Table

    Select the source tables:

    • If source table mode is set to single table, you can search by entering a table name keyword, or enter an exact table name and click Precise Search. After you select a table, the system automatically checks its status. Click the image icon to copy the name of the selected table.

    • If you select multiple table for source table mode, you can enter different expressions to add tables based on the table matching method.

      • General Rule: Enter an expression to filter for tables that share the same structure. The system supports enumerations, regular expression-like patterns, and a mix of both. For example: table_[001-100];table_102;table_abc*. The asterisk (*) is effective only at the beginning or end of a pattern.

      • database regular expression: Enter a regular expression compatible with your database. At runtime, the system uses the regular expression to dynamically match tables for synchronization.

      After you enter an expression, click Precise Search to view a list of matched tables in the Confirm Matching Details dialog box.

    Split key (optional)

    The system uses the specified split key to partition the data, which enables parallel reads when concurrency is configured. Use a primary key or a column with an index as the split key to ensure optimal data transfer performance.

    Important

    When you select a date or time column, the system identifies the minimum and maximum values and splits the data based on the time range and concurrency. This method does not guarantee even data distribution.

    Input filter (optional)

    Specify a filter condition for the input data, such as ds=${bizdate}. The input filter can be used to read a fixed subset of data or to filter data dynamically using parameters.

    • A fixed subset of data.

    • A filter that uses parameters.

    Output field

    The Output Field area displays all fields from the selected table that match the filter conditions. You can perform the following operations:

    • Field management: If you do not need to output certain fields to downstream components, you can remove them.

      • To remove a single field: Click the sgaga icon in the Actions column for the field you want to remove.

      • To remove multiple fields: Click Field Management. In the Field Management dialog box, select the fields you want to remove, click the left arrow icon image to move them to the unselected list, and then click OK.

        image..png

    • Batch add: Click Batch Add to configure fields in bulk using JSON, TEXT, or DDL formats.

      Note

      After you add fields in bulk and click OK, the existing field configuration is overwritten.

      • To add fields in JSON format, for example:

        // Example:
          [{
             "index": 0,
             "name": "id",
             "type": "int(10)",
             "mapType": "Long",
             "comment": "comment1"
           },
           {
             "index": 1,
             "name": "user_name",
             "type": "varchar(255)",
             "mapType": "String",
             "comment": "comment2"
         }]
        Note

        index specifies the column number of the field, starting from 0. name specifies the name of the output field. type specifies the data type of the output field.

        For example, "index":3,"name":"user_id","type":"String" indicates that the fourth column of the file is imported, the field name is user_id, and the field type is String.

      • To add fields in TEXT format, for example:

        // Example:
        0,id,int(10),Long,comment1
        1,user_name,varchar(255),Long,comment2
        • The row delimiter separates each field definition. The default is a newline character (\n). Semicolons (;) and periods (.) are also supported.

        • The column delimiter separates the attributes within a single field definition. The default is a comma (,).

      • To add fields in DDL format, for example:

        CREATE TABLE tablename (
        	user_id serial,
        	username VARCHAR(50),
        	password VARCHAR(50),
        	email VARCHAR (255),
        	created_on TIMESTAMP,
        );
    • Create output field: Click + Create Output Field, and then enter the Field, Type, and Comment, and select a Mapping Type. After you finish configuring the row, click the image icon to save.

      System fields: You can select a system field to identify the source of each row of data. This is useful when synchronizing data from multiple tables (such as sharded databases and tables) into a single destination table. After you select a system field, the system automatically populates the field type and mapping type. Available system fields include:

      • dp_datasource: The name of the source data source.

      • dp_dbname: The name of the source database, if applicable.

      • dp_schema: The name of the source schema, if applicable.

      • dp_source_table: The name of the source table.

      • dp_read_timestamp: The timestamp when the SELECT operation started on the source.

      System fields support concatenating multiple system variables, such as dp_dbname.dp_source_table.

      Note
      • The data type and mapping type of a system field cannot be modified.

      • dp_read_timestamp can only be configured separately and cannot be concatenated.

  8. Click Confirm to save the configuration for the PolarDB-X 2.0 input component.