Configure the Oracle input component
The Oracle input component reads data from an Oracle data source. When you sync data from an Oracle data source to another destination, you first configure the Oracle input component to read from the source, and then you configure the destination data source.
Prerequisites
-
An Oracle data source has been created. For more information, see Create an Oracle data source.
-
The account for configuring the Oracle input component must have the sync read permission on the data source. If you do not have this permission, you must apply for it. For more information, see Apply for data source permissions.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose Develop > data integration.
-
In the top navigation bar of the data integration page, select a project. If you are in Dev-Prod mode, you must also select an environment.
-
In the left-side navigation pane, click offline integration. In the Offline Integration list, click the offline pipeline to open its configuration page.
-
In the upper-right corner of the page, click Component Library to open the component library panel.
-
In the left-side navigation pane of the component library panel, select Input. Find the Oracle component in the list of input components on the right, and drag it onto the canvas.
-
Click the
icon on the Oracle input component card to open the Oracle Reader Configuration dialog box. -
In the Oracle Reader Configuration dialog box, configure the following parameters.
Parameter
Description
Step name
The name of the Oracle input component. Dataphin automatically generates a step name, which you can modify. The name must meet the following requirements:
-
Can contain only Chinese characters, letters, underscores (_), and digits.
-
Cannot exceed 64 characters in length.
Data source
In the drop-down list, select an Oracle data source. The list displays all Oracle data sources in Dataphin, including those for which you have the sync read permission and those for which you do not. Click the
icon to copy the name of the selected data source.-
If you do not have the sync read permission for a data source, click Apply next to it to apply for the permission. For more information, see Apply for data source permissions.
-
If you do not have an Oracle data source, click Create Data Source to create one. For more information, see Create an Oracle data source.
Time zone
This is the time zone used to process time-formatted data. By default, this is inherited from the selected data source and cannot be modified.
NoteFor tasks created before version 5.1.2, you can select Data source default configuration or Channel configuration time zone. The default option is Channel configuration time zone.
-
Data source default configuration: The default time zone of the selected data source.
-
Channel configuration time zone: The time zone configured for the current integration task in Properties > channel configuration.
Schema (optional)
Select the schema that contains the source table. If you do not specify a schema, the schema configured in the data source is used by default.
Number of source tables
Select the number of source tables. Options include single table and multiple tables.
-
Single table: Use this option to sync data from a single source table to a single destination table.
-
Multiple tables: Use this option to sync data from multiple source tables to a single destination table. Data from multiple tables is merged into one table by using the UNION algorithm.
For more information about UNION, see INTERSECT, UNION, and EXCEPT.
Table matching mode
Select General Rule or Database Regex.
NoteThis parameter is available only when Number of source tables is set to multiple tables.
Table
Select the source table or tables.
-
If Number of source tables is set to single table, you can search for a table by entering a keyword, 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 name of the selected table. -
If Number of source tables is set to multiple tables, you can add tables by using different expressions based on the selected table matching mode.
-
If you select General Rule as the table matching mode, enter an expression in the input box to filter for tables with the same structure. The system supports enumerated lists, regular expressions, and a mix of both. For example:
table_[001-100];table_102;. -
If you select Database Regex as the table matching mode, enter a regular expression that is supported by the current database. Dataphin matches tables in the source database based on this expression. At runtime, the task syncs all tables that match the expression, including any new ones.
After you enter an expression, click Exact Match to view a list of matched tables in the Confirm Match Details dialog box.
-
Split key (optional)
Dataphin splits data into shards based on the specified split key. This parameter enables parallel data reading when used with concurrency settings. For optimal performance, use a column from the source table that has a primary key or an index.
ImportantIf you select a date or time data type, the system identifies the maximum and minimum values and splits the data based on the total time range and concurrency. The splits are not guaranteed to be even.
Batch size (optional)
The number of records to read in each batch. Reading data in batches (for example, 1,024 records at a time) instead of one record at a time reduces round trips to the data source, improving I/O efficiency and lowering network latency.
Encoding (optional)
The character encoding used to read the data. Supported encoding types include UTF-8, GBK, and ISO-8859-1.
Input filter (optional)
The filter conditions for data extraction. You can configure this parameter in the following ways:
-
Fixed value: Extract specific data. For example,
ds=20211111. -
Variable parameter: Extract a subset of data. For example,
ds=${bizdate}.
Output fields
This section lists the fields to be read from the source table(s). You can perform the following operations:
-
Field management: If you do not need to output specific fields to a downstream component, you can delete them.
-
To delete a single field: Click the
icon in the Actions column for that field. -
To delete fields in batches: To delete many fields at once, click Field Management. In the Field Management dialog box, select multiple fields, click the
left arrow icon to move the selected input fields to the unselected list, and then click OK.
-
-
Add fields in batches: Click Batch Add to add or replace all fields at once using the JSON, TEXT, or DDL format.
NoteAfter you add fields in batches and click OK, the new fields overwrite any existing field configurations.
-
To add fields in batches by using the JSON format, see the following 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 column number of the object,namespecifies the field name after import, andtypespecifies the field type after import. For example,"index":3,"name":"user_id","type":"String"means the third column in the file is imported as a String type field nameduser_id. -
To add fields in batches by using the TEXT format, see the following example:
// Example: 1,id,int(10),Long,comment1 2,user_name,varchar(255),Long,comment2-
The row delimiter separates the information for each field. The default is a newline character (\n). The supported delimiters are a newline character (\n), a semicolon (;), and a period (.).
-
The column delimiter separates the field name and field type. The default is a comma (,).
The field type is optional.
-
-
To add fields in batches by using the DDL format, see the following example:
CREATE TABLE tablename ( user_id serial, username VARCHAR(50), password VARCHAR(50), email VARCHAR (255), created_on TIMESTAMP, );
-
-
Create output fields: Click +Create Output Field and follow the on-screen prompts to enter the Field, Type, and Remarks, and select a Mapping Type. After you configure the current row, click the
icon to save.System fields: You can select system fields to identify the source of each row of data. When you select a system field, Dataphin automatically fills in the field type and mapping type. This is useful when you sync data from multiple tables, such as sharded databases, to a single destination table. System fields include:
-
dp_datasource: The name of the data source being synced. -
dp_dbname: The name of the database being synced, if any. -
dp_schema: The name of the schema being synced, if any. -
dp_source_table: The name of the source table being synced. -
dp_read_timestamp: The start time of the source SELECT operation.
You can concatenate multiple system variables. For example,
dp_dbname.dp_source_table.Note-
You cannot modify the field type and mapping type of system fields.
-
The
dp_read_timestampsystem field supports only standalone configuration and cannot be concatenated.
-
-
-
Click OK to save the configuration.

icon to save.