Configure the KingbaseES Input Component
The KingbaseES Input component reads data from a KingbaseES data source. To sync data from a KingbaseES data source to another data source, configure the KingbaseES Input component to read from the source, and then configure the target data source.
Prerequisites
-
You have created a KingbaseES data source. For more information, see Create a KingbaseES Data Source.
-
The account used to configure the KingbaseES Input component must have sync-read permission for the data source. If the account does not have this permission, request it. For more information, see Request, Renew, or Release Data Source Permissions.
Procedure
-
On the Dataphin homepage, choose Develop > Data Integration from the top menu bar.
-
On the Integration page, select a Project from the top menu bar. If you are in Dev-Prod mode, you must also select an environment.
-
In the navigation pane on the left, click Batch Pipeline. In the Batch Pipeline list, click the offline pipeline that you want to develop. The configuration page for the pipeline opens.
-
In the upper-right corner of the page, click Component Library to open the Component Library panel.
-
In the navigation pane on the left of the Component Library panel, click Input. From the list of input components on the right, find the KingbaseES component and drag it onto the canvas.
-
Click the
icon on the KingbaseES Input widget card to open the KingbaseES Input Configuration dialog box. -
In the KingbaseES Input Configuration dialog box, configure the parameters.
Parameter
Description
Step Name
The name of the KingbaseES input component. Dataphin generates a default name that you can change. The name must follow these rules:
-
Use only Chinese characters, letters, underscores (_), and digits.
-
Keep the name under 64 characters.
Datasource
Lists all KingbaseES data sources in Dataphin, including those you have sync-read permission for and those you do not. Click the
icon to copy the data source name.-
If you lack sync-read permission for a data source, request it. For instructions, see Request, Renew, or Release Data Source Permissions.
-
If you do not have a KingbaseES data source, click Create Data Source to create one. For details, see Create a KingbaseES Data Source.
Source Table Count
Select the number of source tables. Options are Single Table and Multiple Tables:
-
Single Table: Syncs data from one source table to one target table.
-
Multiple Tables: Syncs data from multiple source tables to one target table. The system uses the union algorithm to merge data from multiple tables into one.
For more information about union, see Intersect, Union, Except, and Minus.
Table Matching Method
You can select only Generic Rule.
NoteThis setting is available only when you select Multiple Tables for Source Table Count.
Table
Select the source table:
-
If you selected Single Table for Source Table Count, search by entering a keyword for the table name. Or enter the exact table name and click Exact Match. After you select a table, the system automatically checks its status. Click the
icon to copy the selected table name. -
If you selected Multiple Tables for Source Table Count, add tables as follows:
-
In the input box, enter an expression to filter tables with the same structure.
The system supports enumeration, regex-like patterns, and mixed patterns. For example:
table_[001-100];table_102. -
Click Exact Match. In the Confirm Match Details dialog box, review the list of matched tables.
-
Click Confirm.
-
Shard Key (Optional)
Splits data based on the specified shard key field. Use this with concurrency settings to enable concurrent reads. Any column from the source table can serve as the shard key. For best performance, use a primary key or an indexed column.
ImportantIf you select a date-time type, the system performs brute-force splitting across the full time range using the max and min values. This method does not guarantee even distribution.
Batch Read Size (Optional)
The number of records to read per batch. Setting a batch size such as 1024 reduces round trips to the data source, improves I/O efficiency, and lowers network latency.
Input Filter (Optional)
Filter conditions for input fields. For example:
ds=${bizdate}. Common scenarios for Input Filter:-
A fixed subset of data.
-
Parameter-based filtering.
Output Fields
Lists all fields from the selected table that match the filters. Available actions:
-
Field Management: Remove fields that downstream components do not need:
-
Remove individual fields: Click the
icon in the Actions column to remove a field. -
Batch field deletion: To remove multiple fields at once, click Field Management, select the fields in the Field Management dialog box, click the
left-moving icon to move them to the unselected list, and click OK.
-
-
Batch Add: Click Batch Add to add output fields in JSON, TEXT, or DDL format.
NoteAfter you click OK, the batch-add operation overwrites existing field configurations.
-
JSON format example:
// Example: [{ "index": 1, "name": "id", "type": "int(10)", "mapType": "Long", "comment": "comment1" }, { "index": 2, "name": "user_name", "type": "varchar(255)", "mapType": "String", "comment": "comment2" }]Noteindexspecifies the 0-based column index of the specified object,namespecifies the name of the field after import, andtypespecifies the type of the field after import. For example,"index":3,"name":"user_id","type":"String"indicates that the fourth column of the file is imported, the field name isuser_id, and the field type isString. -
TEXT format example:
// Example: 1,id,int(10),Long,comment1 2,user_name,varchar(255),Long,comment2-
The row delimiter separates each field’s information. By default, it is a line feed (\n). You can also use a semicolon (;) or period (.).
-
The column delimiter separates field names from field types. By default, it is a comma (,). You can also use
','. Field types are optional and default to','.
-
-
You can also add output fields in DDL format. For example:
CREATE TABLE tablename ( user_id serial, username VARCHAR(50), password VARCHAR(50), email VARCHAR (255), created_on TIMESTAMP, );
-
-
Add a new output field: Click + Add Output Field. Enter the Column, Type, and Comment. Select a Mapping Type. Click the
icon to save the row.
-
-
Click OK to finish configuring the KingbaseES Input Component.