Configure IBM DB2 Output Component

更新时间: 2026-06-04 20:48:14

The IBM DB2 output component writes data to an IBM DB2 data source. After you configure the source data in a batch pipeline, configure the IBM DB2 output component as the target.

Prerequisites

Procedure

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

  2. In Dev-Prod mode, select a Project or Environment from the top menu bar of the Data Integration page.

  3. In the left navigation pane, click Batch Pipeline. From the Batch Pipeline list, select the offline pipeline to develop.

  4. Click Component Library in the upper-right corner to open the Component Library panel.

  5. In the Component Library, select Output, find IBM DB2, and drag it onto the canvas.

  6. Click and drag the image icon to connect an input, transform, or flow component to the IBM DB2 output component.

  7. Click the image icon on the IBM DB2 output component card to open the IBM DB2 Output Configuration dialog box.image

  8. In the IBM DB2 Output Configuration dialog box, configure the following parameters.

    Parameter

    Description

    Basic Settings

    Step Name

    The name of the output component. Dataphin auto-generates a name, which you can modify. Naming rules:

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

    • Cannot exceed 64 characters.

    Datasource

    Lists all IBM DB2 data sources, including those you have write-through permission for and those you do not. Click the image icon to copy the data source name.

    Table

    Select the target table for output data. Enter a keyword or exact table name and click Precise Search. The system checks the table status after selection. Click the image icon to copy the table name.

    Loading Policy

    Only the Append Data policy is supported. A primary key or constraint violation triggers a dirty data error.

    Batch Write Data Volume (optional)

    The data volume per batch write. Works with Batch Write Count — whichever limit is reached first triggers the write. Default: 32 MB.

    Batch Write Count (optional)

    Default: 2048 entries. The Batch Write Count and Batch Write Data Volume work together — whichever limit is reached first triggers the write.

    • When either the data volume or record count limit is reached, the system writes the accumulated batch to the target.

    • Set the batch write data volume to 32 MB. Adjust the batch write count based on record size — set it high to maximize batch efficiency. For example, with 1 KB records and a 16 MB batch size, set the count above 16,384 (16 MB / 1 KB), such as 20000 entries. The system then triggers writes when the 16 MB volume limit is reached first.

    Prepared Statement (optional)

    An SQL statement executed on the database before data import.

    Example: To maintain service availability, create target table Target_A, write data to it, then swap it with the live table Service_B by renaming Service_B to Temp_C, renaming Target_A to Service_B, and dropping Temp_C.

    End Statement (optional)

    An SQL statement executed on the database after data import.

    Field Mapping

    Input Field

    Shows input fields from the upstream component output.

    Output Field

    Shows the output fields. Available 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 configure fields in JSON, TEXT, or DDL format.

      • Batch configuration in JSON format, for example:

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

        name is the field name and type is the field type. For example, "name":"user_id","type":"String" imports user_id as a String field.

      • Batch configuration in TEXT format, for example:

        // Example:
        user_id,String
        user_name,String
        • Row delimiter: separates fields. Default: line feed (\n). Supports line feed (\n), semicolon (;), or period (.).

        • Column delimiter: separates the field name and type. Default: 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, enter Column, select Type, then click the image icon to save.

    Mapping

    Map upstream input fields to target table fields. Quick Mapping supports Row Mapping and Name Mapping.

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

    • Row Mapping: Maps fields by row position when source and target field names differ.

  9. Click Confirm to save the IBM DB2 output component configuration.

上一篇: Configure SAP HANA Output Components 下一篇: Configure Teradata output component
阿里云首页 智能数据建设与治理 Dataphin 相关技术圈