Configure IBM DB2 Output Component
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
-
An IBM DB2 data source is created. Create IBM DB2 Data Source.
-
Your account has write-through permissions for the IBM DB2 data source. If not, apply through Request, Renew, and Return Data Source Permissions.
Procedure
-
On the Dataphin home page, select Development > Data Integration from the top menu bar.
-
In Dev-Prod mode, select a Project or Environment from the top menu bar of the Data Integration page.
-
In the left navigation pane, click Batch Pipeline. From the Batch Pipeline list, select the offline pipeline to develop.
-
Click Component Library in the upper-right corner to open the Component Library panel.
-
In the Component Library, select Output, find IBM DB2, and drag it onto the canvas.
-
Click and drag the
icon to connect an input, transform, or flow component to the IBM DB2 output component. -
Click the
icon on the IBM DB2 output component card to open the IBM DB2 Output Configuration dialog box.
-
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
icon to copy the data source name.-
For data sources without write-through permission, click Request to apply. Request Data Source Permissions.
-
If no IBM DB2 data source exists, click Create Data Source. Create IBM DB2 Data Source.
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
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.

-
Click the
icon to move the Selected Input Fields to Unselected Input Fields. -
Click the
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" }]Notename 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
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.
-
-
Click Confirm to save the IBM DB2 output component configuration.