AnalyticDB for MySQL 3.0 input component
Use the AnalyticDB for MySQL 3.0 input component to read data from an AnalyticDB for MySQL 3.0 data source. To synchronize data to a destination, you must configure this input component to read from the source before configuring the destination data source. This topic describes how to configure the AnalyticDB for MySQL 3.0 input component.
Prerequisites
Ensure you meet the following prerequisites:
-
You have created an AnalyticDB for MySQL 3.0 data source. For more information, see Create an AnalyticDB for MySQL 3.0 data source.
-
The account that you use to configure the input component must have read permission for 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, select a project. If you are in Dev-Prod mode, you must also select an environment.
-
In the left-side navigation pane, click Batch Integration. In the Batch Integration list, click the desired batch 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 AnalyticDB for MySQL 3.0 component and drag it to the canvas.
-
On the component card, click the
icon to open the AnalyticDB for MySQL 3.0 Input Configuration dialog box. -
In the AnalyticDB for MySQL 3.0 Input Configuration dialog box, configure the parameters.
Parameter
Description
Step name
A unique name for this step. Dataphin generates a default name, which you can change to fit your needs.
-
It can contain only Chinese characters, letters, underscores (_), and digits.
-
It cannot exceed 64 characters in length.
Data source
In the data source drop-down list, select an AnalyticDB for MySQL 3.0 data source. The list includes all available data sources of this type, regardless of your current permissions. Click the
icon to copy the name of the current data source.-
For a data source where you lack read permission, click Apply next to the data source to request the permission. For more information, see Apply for data source permissions.
-
If you do not have an AnalyticDB for MySQL 3.0 data source, click New data source to create one. For more information, see Create an AnalyticDB for MySQL 3.0 data source.
Time zone
The time zone for processing time-based data. By default, this inherits the time zone from the selected data source and cannot be changed.
NoteFor tasks created before version 5.1.2, you can select Default data source configuration or Channel configuration time zone. By default, Channel configuration time zone is selected.
-
Default data source configuration: Uses the default time zone of the selected data source.
-
Channel configuration time zone: Uses the time zone configured for the current integration task in Properties > Channel Configuration.
Source tables
Select whether to read from a Single Table or from Multiple Tables.
-
Single table: Read data from one source table.
-
Multiple tables: Read and combine data from multiple source tables. The data is combined using a UNION operation.
For more information about UNION, see INTERSECT, UNION, and EXCEPT.
Table matching mode
Select General Rule or Database Regular Expression.
NoteThis parameter is available only when Source Tables is set to Multiple Tables.
Table
Select the source table or tables.
-
If you set Source Tables to Single Table, you can search for a table by entering keywords, or enter an exact table name and click Precise Search. After you select a table, the system automatically checks its status. Click the
icon to copy the name of the selected table. -
If you set Source Tables to Multiple Tables, you can add tables by entering expressions based on the selected Table Matching Mode.
-
If you select General Rule, enter an expression to match tables with the same schema. You can specify multiple tables or patterns separated by semicolons (;), including specific names, range patterns, and combinations. For example:
table_[001-100];table_102;. -
The system uses this expression to match tables in the source database. At runtime, the task dynamically identifies and synchronizes any new tables that match the expression.
After you enter an expression, you can click Precise Search to view a list of matched tables in the Confirm Matching Details dialog box.
-
Split key (Optional)
Specifies a field to partition the data for parallel reads. When you also configure concurrency, the system splits the data into partitions based on this key. For best performance, use a primary key or an indexed column as the split key.
ImportantIf you use a date or time field, the system splits the data by linearly dividing the time range (from minimum to maximum value) by the number of concurrent tasks. Even data distribution is not guaranteed.
Input filter (Optional)
Enter the filter conditions for the input field, for example,
ds=${bizdate}. Input filtering applies to the following two scenarios:-
Reading a fixed subset of data.
-
Filtering data by using parameters.
Output field
Displays the fields to be read from the source table(s). You can perform the following operations:
-
Field Management: Adjust the output fields in the Field Management dialog box.
-
Delete individual fields: To remove a field, click the delete icon (
) in its row. -
Delete fields in bulk: Click Field Management. In the Field Management dialog box, select the fields to remove, click the left arrow icon (
) to move them to the unselected list, and click OK.
-
-
Batch Add: Click Batch Add to configure fields in bulk using JSON, TEXT, or DDL format.
NoteAfter you add fields in bulk and click OK, the new configuration will overwrite any existing field settings.
-
Example of JSON format:
// Example: [{ "index": 1, "name": "id", "type": "int(10)", "mapType": "Long", "comment": "comment1" }, { "index": 2, "name": "user_name", "type": "varchar(255)", "mapType": "String", "comment": "comment2" }]Noteindex: The 1-based number of the source column.name: The name for the output field.type: The data type in the source database.mapType: The corresponding data type in Dataphin. For example,{"index": 2, "name": "username", "mapType": "String"}reads the second column from the source, names itusername, and processes it as a String. -
Example of TEXT format:
// Example: 1,id,int(10),Long,comment1 2,user_name,varchar(255),Long,comment2-
The row delimiter separates each field's information. The default is a newline character (\n). Semicolons (;) and periods (.) are also supported.
-
The column delimiter (default: comma ,) separates the properties for each field in the following order:
index,name,type,mapType,comment. The type, mapType, and comment properties are optional.
-
-
Example of DDL format:
CREATE TABLE tablename ( user_id serial, username VARCHAR(50), password VARCHAR(50), email VARCHAR (255), created_on TIMESTAMP, );
-
-
Click + Create Output Field and specify the Field name, Type, Comment, and Mapping Type. Click the save icon (
) to confirm the new field.System Field: You can select system fields to identify the source of each row. This is useful when you synchronize data from multiple tables (such as sharded tables) to a single destination table. When you select a system field, the system automatically populates the field type and mapping type. The following system fields are available:
-
dp_datasource: The name of the data source. -
dp_dbname: The name of the database, if applicable. -
dp_schema: The name of the schema, if applicable. -
dp_source_table: The name of the source table. -
dp_read_timestamp: The start time of the SELECT operation at the source.
System fields support concatenating multiple system variables, for example,
dp_dbname.dp_source_table.Note-
You cannot modify the field type or mapping type of a system field.
-
The
dp_read_timestampsystem field must be configured individually and cannot be concatenated.
-
-
-
Click OK to save the configuration for the AnalyticDB for MySQL 3.0 input component.

) to confirm the new field.