Automatically Mapping Composite Task Data
Function
Perform automatic mapping of composite tasks (a maximum of 2000 tables at a time).
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v2/{project_id}/fdi/multi-tasks/mappings/auto
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see "Appendix" > "Obtaining a Project ID" in the API Reference. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
source_ds_id |
Yes |
String |
Source data source ID. |
|
source_group |
No |
String |
Source group. |
|
target_ds_id |
Yes |
String |
Destination data source ID. |
|
target_group |
No |
String |
Destination group. |
|
task_id |
No |
String |
Task ID, the unique identifier of a task. |
|
ext_info |
No |
String |
Additional information. |
|
task_type |
No |
Integer |
1: real-time; 2: scheduled |
|
mapping_prefix |
No |
String |
Prefix for mapping. Destination table name = Prefix (optional) + source table name + suffix (optional) |
|
mapping_suffix |
No |
String |
Suffix for mapping. Destination table name = Prefix (optional) + source table name + suffix (optional) |
|
target_select_mapping_tables |
No |
String |
Source table range to be mapped. Use commas (,) to separate multiple tables, for example, schema.table1,schema.table2, or specify the entire database using schema.*. |
|
source_select_mapping_tables |
No |
String |
Destination table range to be mapped. Use commas (,) to separate multiple tables, for example, schema.table1,schema.table2, or specify the entire database using schema.*. |
Response Parameters
Status code: 200
ok
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
None
Example Responses
Status code: 200
ok
[ {
"target_instance_id" : "62afe8b5-6bf0-40ea-b4f6-6b06a39be754",
"source_app_id" : "c24d7cf4-0e5a-416c-b197-30e6696b98f2",
"mapping" : [ {
"ext_info" : {
"server_id" : 1665647763438
},
"id" : "f1c1d7f3afc94c1c995628df55939ced",
"mapping" : [ {
"is_add_boolean_mapping" : false,
"is_add_custom_mapping" : false,
"is_add_date_mapping" : false,
"is_add_fdi_uuid_mapping" : false,
"is_add_mapping" : false,
"source_column" : "c1",
"source_column_length" : "10",
"source_column_type" : "INT",
"target_column" : "c1",
"target_column_length" : "10",
"target_column_type" : "INT"
}, {
"is_add_boolean_mapping" : false,
"is_add_custom_mapping" : false,
"is_add_date_mapping" : false,
"is_add_fdi_uuid_mapping" : false,
"is_add_mapping" : false,
"source_column" : "c2",
"source_column_length" : "100",
"source_column_type" : "VARCHAR",
"target_column" : "c2",
"target_column_length" : "100",
"target_column_type" : "VARCHAR"
} ],
"mapping_percent" : 100,
"project_id" : "0ab7e64afd80d2822fe0c00d26395a1f",
"source_columns" : [ {
"field_length" : "10",
"field_name" : "c1",
"field_type" : "INT",
"null_able" : "0",
"unique" : "1"
}, {
"field_length" : "100",
"field_name" : "c2",
"field_type" : "VARCHAR",
"null_able" : "1",
"unique" : "0"
} ],
"source_ds_id" : "984edcd6735c4988b15f6a497cb97c5a",
"source_group" : "SOURCE_GROUP1",
"source_table" : "test.t1",
"status" : "ADD",
"target_columns" : [ {
"field_length" : "10",
"field_name" : "c1",
"field_type" : "INT",
"null_able" : "0",
"unique" : "0"
}, {
"field_length" : "100",
"field_name" : "c2",
"field_type" : "VARCHAR",
"null_able" : "1",
"unique" : "0"
} ],
"target_ds_id" : "dd14c908aa4d446b85949550f523ff83",
"target_group" : "TARGET_GROUP1",
"target_table" : "fditest.t1",
"task_id" : "e530a006683d400e8b3bac1d7c00952b",
"updated_time" : 1665647764511
} ],
"target_ds_name" : "fdi_MySQL_zqx_205",
"target_app_id" : "c24d7cf4-0e5a-416c-b197-30e6696b98f2",
"source_instance_id" : "62afe8b5-6bf0-40ea-b4f6-6b06a39be754",
"task_id" : "e530a006683d400e8b3bac1d7c00952b",
"source_ds_type" : "MYSQL",
"ext_info" : {
"server_id" : 1665647763438
},
"target_ds_type" : "MYSQL",
"total" : 1,
"source_group" : "SOURCE_GROUP1",
"source_ds_id" : "984edcd6735c4988b15f6a497cb97c5a",
"target_group" : "TARGET_GROUP1",
"source_ds_name" : "mysql8.0.30",
"target_ds_id" : "dd14c908aa4d446b85949550f523ff83"
} ]
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
ok |
|
400 |
bad request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot