Allowed creating, deleting, and renaming fields in the target table.
Allowed modifying the type, length, and precision of fields in the target table.
Allowed configuring Not Null, Primary Key, and Remark for the target table. For details, see Synchronizing DDL Changes Using Scheduled Task.
This document introduces the configuration items on the Data Destination and Mapping tab page of the Data Synchronization node or the DB Table Output operator in the Data Transformation node.
The Data Destination and Mapping tab page is shown in the following figure.
Select where to write the data. For details about the supported data sources, see the "Types of Data Sources Supported by Scheduled Task" section of Data Sources Supported by FineDataLink.
The drop-down list of Data Source only contains the data sources connected via data connections on which you have Use permission.
You can select the schema (if any) in the database, as shown in the following figure.
The default value of Schema is explained as follows.
If Schema is configured in the data connection, the default value is the one set in the data connection.
If Schema is not configured in the data connection, the value defaults to empty. Select the schema from the drop-down list.
1. The Schema setting item appears only when you select a relational database.
2. If you set Target Table to Existing Table, the right drop-down list displays tables in the target database/schema. If you set Target Table to Auto Created Table, the table will be created in the target database/schema.
Create a table in the target database to store the data.
1. Table names in versions prior to 4.1.6.1 can contain English letters, numbers, and underscores. Chinese characters are additionally supported in FineDataLink 4.1.6.1 and later versions.
2. You need to select the table type when writing data into the Doris or StarRocks database. These two data sources provide limited support for Write Method. For details, see Doris Instruction and StarRocks Instruction.
Select an existing table in the target database to store the data.
1. If you set Target Table to Existing Table, the description of the existing table is displayed.
2. If you set Target Table to Auto Created Table, the table description defaults to empty and can be customized.
Requirements of the table description are as follows:
It is empty by default and not mandatory.
You can enter numbers, letters, special characters, and Chinese characters.
The maximum length is 500 characters.
3. Databases that do not support Table Description include ClickHouse, Hive, Impala, Transwarp Inceptor, Informix, MaxCompute, SQLite, and StarRocks.
For details, see Synchronizing DDL Changes Using Scheduled Task.
Establish the mapping relationship between source and target fields.
1. Starting from FineDataLink 4.1.3, when writing data into an auto-created table in the Hive or Transwarp Inceptor data source, you can select specific fields in the target table as partition keys. For details, see Partition Table Creation and Data Reading/Writing.
2. Starting from FineDataLink 4.1.9.3, you can modify the field mapping rules of data sources in General Configuration. For details, see General Configuration - Field Mapping Rule.
Select the method to map source and target fields. Options include Map Fields with Same Name and Map Fields in Same Row.
Fields in the source and target tabled are matched by name similarity. The overall logic is as follows:
1. The source field is mapped to the target field whose name is the same as that of the source field.
2. If there is no such target field:
The source field is mapped to the target field whose name either contains the source field name or is included in the source field name.
Multiple target fields that meet the above condition are prioritized based on the order in which fields are listed. The field listed first has the highest priority and is displayed first during matching.
The field that has already been matched will not be matched again, so no N-to-1 mapping relationship exists between source and target fields.
3. If there is no field in the target table whose name completely matches the source field name or includes the source field name, the target field of that source field will be left empty.
The source field and the target field in the same row in the field mapping area are mapped.
This method applies to scenarios where the order of the source field matches that of the target field.
The Manual Table Creation button is displayed only when you set Target Table to Auto Created Table.
After clicking Manual Table Creation, you can modify the field name and type and define various table attributes.
1. You can view and modify the table creation statement.
You can re-obtain the table creation statement, which is equal to resetting the statement.
Your changes to the table creation statement do not affect the configuration in the field mapping area.
2. You can click Start Table Creation after modifying the statement. After the table is successfully created in the database, the target table is displayed as an existing table.
3. The configuration in the Manual Table Creation window does not take effect when the task is running. You need to click Start Table Creation. After the table is created successfully, review the configuration and ensure it aligns with the logic of the existing table.
1. The source field to be written into the target table must be configured with the mapping relationship. That is, its target field cannot be empty.
2. To write only specific source fields into the target table, you can cancel the mapping for unnecessary fields or use the Field Setting operator to delete unnecessary fields. The unmapped source fields will not be written into the target table nor affect other fields.
1. You can perform the following operations on the target field.
Unmap a field.
Reorder fields.
Modify the field type and name.
Set the primary key. Enable Not Null.
2. You can customize the mapping relationship between the source and target fields.
You can click the Reobtain button to refresh the field mapping relationship when the field or field type of the source table changes, which will reset the configuration in the field mapping area.
If you set Target Table to Auto Created Table on the Data Destination and Mapping tab page, you can set the primary key in the field mapping area.
If the data source configuration method is set to Table Selection and the source table contains a primary key, the primary key field will be synchronized as the primary key in the target table automatically during field mapping with Not Null ticked when Auto Created Table is selected as Target Table, as shown in the following figure.
You can filter target fields to obtain mapped/unmapped fields and error-free/error fields (such as fields with empty names or types).
1. Databases that do not support the reading or writing of the field remark include Hive, Impala, Transwarp Inceptor, Informix, MaxCompute, SQLite, and StarRocks.
2. The field remark is written into the target database when the target table is successfully created, and remains unchanged after that. Manual changes to the field remark are not included in DDL changes.
Synchronizing the remark of the source field to the target table is supported. If you set Target Table to Auto Created Table, you can customize the remark of the target field.
1. The Remark column of the source table is explained as follows.
If the data source configuration method is set to Table Selection, the remark of the source field is obtained automatically and displayed in the field mapping area on the Data Destination and Mapping tab page.
Otherwise, the value of the Remark column is --.
2. The Remark column of the target table is explained as follows.
If you set Target Table to Existing Table, the Remark column displays the remark of fields in the existing table, which cannot be modified.
If you set Target Table to Auto Created Table, you can customize the field remark.
Requirements of the field remark are as follows:
The maximum length is 30 characters.
You can process target fields in the task to update the target table structure when DDL changes occur in the source table For details, see Synchronizing DDL Changes Using Scheduled Task.
Pay attention that:
1. If you delete some source fields and switch the mapping method, the mapping relationship will be adjusted only for the remaining fields.
2. To obtain the matching result of mapping fields in the same row, switch the mapping method from the default Map Fields with Same Name to Map Fields in Same Row and click the Reobtain button.
3. There may be no matching target field in the following two scenarios. In these cases, the target field on the right is empty.
Map Fields with Same Name is selected, and the target table does not contain fields whose names contain the names of the source fields.
Map Fields in Same Row is selected, and the number of source fields exceeds the number of target fields.
4. During mapping, if a target field has a null value, a warning icon will appear. When you hover the cursor over it, a prompt will appear, saying, "A null value exists in the Target Table field."
5. After a scheduled task is executed, the field type of the target table cannot be modified in the field mapping area.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy