All Products
Search
Document Center

Dataphin:Configure IBM DB2 Output Component

Last Updated:Feb 12, 2026

The IBM DB2 output component allows for writing data to an IBM DB2 data source. When synchronizing data from other sources to IBM DB2, you must configure the target data source properties after setting up the source data. This topic guides you through the configuration process for the IBM DB2 output component.

Prerequisites

Procedure

  1. On the Dataphin home page, select Development > Data Integration from the top menu bar.

  2. In the Data Integration page's top menu bar, select Project or Environment in Dev-Prod mode.

  3. In the navigation pane on the left, click Batch Pipeline. Then, from the Batch Pipeline list, select the offline pipeline you want to develop to access its configuration page.

  4. To open the Component Library panel, click Component Library located in the upper-right corner of the page.

  5. In the Component Library's left-side navigation pane, select Output. Then, from the list of output components on the right, locate the IBM DB2 component and drag it onto the canvas.

  6. Connect the target input, transform, or flow component to the IBM DB2 output component by clicking and dragging the image icon.

  7. On the IBM DB2 output component card, you can click the image icon to open the IBM DB2 Output Configuration dialog box.image

  8. In the IBM DB2 Output Configuration dialog box, you can configure the necessary parameters.

    Parameter

    Description

    Basic Settings

    Step Name

    This is the name of the IBM DB2 output component. Dataphin automatically generates the step name, but you can modify it according to the business scenario. The naming convention is as follows:

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

    • Cannot exceed 64 characters.

    Datasource

    In the data source drop-down list, all IBM DB2 type data sources are displayed, including data sources for which you have write-through permission and those for which you do not. Click the image icon to copy the current data source name.

    • For data sources without write-through permission, you can click Request to apply for write-through permission for the data source. For specific operations, see Request Data Source Permissions.

    • If you do not have an IBM DB2 type data source, click Create Data Source to create a data source. For specific operations, see Create IBM DB2 Data Source.

    Table

    Select the target table for the output data. You can enter a table name keyword to search or enter the exact table name and then click Precise Search. After selecting a table, the system will automatically perform a table status check. Click the image icon to copy the name of the currently selected table.

    Loading Policy

    The system supports selecting the Append Data policy. Under the append data policy, when a primary key or constraint violation occurs, the system will prompt a dirty data fault.

    Batch Write Data Volume (optional)

    The size of the data volume written at one time. You can also set the Batch Write Count. During writing, the system will write according to the limit reached first among the two configurations. The default is 32 MB.

    Batch Write Count (optional)

    The default is 2048 entries. During data synchronization writing, a batch write strategy is adopted. The set parameters include Batch Write Count and Batch Write Data Volume.

    • When the accumulated data volume reaches any of the set limits (that is, the batch write data volume or count limit), the system will consider a batch of data to be full and will immediately write this batch of data to the target end at once.

    • It is recommended to set the batch write data volume to 32 MB. For the upper limit of the batch insert count, you can flexibly adjust it according to the actual size of a single record. It is usually set to a large value to fully utilize the advantages of batch writing. For example, if the size of a single record is about 1 KB, you can set the batch insert byte size to 16 MB. Considering this condition, set the batch insert count to be greater than the result of dividing 16 MB by the size of a single record, 1 KB (that is, greater than 16384 entries). Here, it is assumed to be set to 20000 entries. After this configuration, the system will trigger a batch write operation based on the batch insert byte size. Whenever the accumulated data volume reaches 16 MB, a write action will be executed.

    Prepared Statement (optional)

    The SQL script executed on the database before data import.

    For example, to ensure the continuous availability of the service, before the current step writes data, first create the target table Target_A, execute the write to the target table Target_A, and after the current step writes data, rename the table Service_B that continuously provides services in the database to Temp_C. Then rename the table Target_A to Service_B, and finally delete Temp_C.

    End Statement (optional)

    The SQL script executed on the database after data import.

    Field Mapping

    Input Field

    Displays the input fields based on the output of the upstream component.

    Output Field

    Displays the output fields. You can perform the following operations:

    • Field Management: Click Field Management to select output fields.

      image

      • Click the gaagag icon to move the Selected Input Fields to Unselected Input Fields.

      • Click the agfag icon to move the Unselected Input Fields to Selected Input Fields.

    • Batch Add: Click Batch Add to support batch configuration in JSON, TEXT format, or DDL format.

      • Batch configuration in JSON format, for example:

        // Example:
        [{
          "name": "user_id",
          "type": "String"
         },
         {
          "name": "user_name",
          "type": "String"
         }]
        Note

        name indicates the name of the imported field, and type indicates the type of the imported field. For example, "name":"user_id","type":"String" indicates that the field named user_id is imported, and the field type is set to String.

      • Batch configuration in TEXT format, for example:

        // Example:
        user_id,String
        user_name,String
        • The row delimiter is used to separate the information of each field. The default is a line feed (\n). It supports line feed (\n), semicolon (;), or period (.).

        • The column delimiter is used to separate the field name and field type. The default is a comma (,).

      • Batch configuration in DDL format, for example:

        CREATE TABLE tablename (
            id INT PRIMARY KEY,
            name VARCHAR(50),
            age INT
        );
    • Create Output Field: Click +create Output Field and fill in Column and select Type according to the page prompts. After completing the configuration of the current row, click the image icon to save.

    Mapping

    Based on the input from upstream and the fields of the target table, you can manually select field mapping. Quick Mapping includes Row Mapping and Name Mapping.

    • Name Mapping: Map fields with the same field name.

    • Row Mapping: The field names of the source table and the target table are inconsistent, but the data of the fields in the corresponding rows needs to be mapped. Only the fields in the same row are mapped.

  9. To finalize the property configuration for the IBM DB2 output component, click Confirm.