Generates an asynchronous thread ID for creating a Data Integration synchronization task. Use the thread ID with QueryDISyncTaskConfigProcessResult to obtain the task creation parameters.
Operation description
Use CreateDISyncTask to directly create batch synchronization tasks. For real-time or other synchronization task types, call GenerateDISyncTaskConfigForCreating to generate an asynchronous thread ID, then call QueryDISyncTaskConfigProcessResult to obtain the required parameters. Pass these parameters to CreateDISyncTask to create the task. Real-time and other synchronization task types can only be created asynchronously.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. You can find this on the Workspace page. |
10000 |
| TaskType |
string |
Yes |
The synchronization task type. Valid values:
|
DI_REALTIME |
| TaskParam |
string |
Yes |
The synchronization task script in JSON format. Supported synchronization types:
Use Sample script for MySQL to MaxCompute synchronization:
Sample script for MySQL to Kafka synchronization:
Sample script for MySQL to Hologres synchronization:
|
{ "type": "realtime", "version": "1.0", "setting": { "resourceGroup": "S_res_group_280749521950784_1623033752022", "scheduleResgroupId": 30003913, "name": "openapi_realtime_solution_0813_1739", "taskType": "oneclick_to_odps" }, "steps": [ { "stepType": "mysql", "parameter": { "connection": [ { "datasourceType": "mysql", "datasource": "mysql_pub", "table": [ "xyx" ] } ] }, "name": "Reader", "category": "reader" }, { "stepType": "odps", "parameter": { "datasource": "odps_first" }, "name": "Writer", "category": "writer" } ] } |
| ClientToken |
string |
No |
A client token for idempotent requests. Prevents duplicate operations from retried calls. |
ABFUOEUOTRTRJKE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Success |
boolean |
Indicates whether the request succeeded. Valid values:
|
true |
| RequestId |
string |
The request ID. |
0bc1411515937635973**** |
| Data |
object |
The asynchronous thread information. |
|
| Status |
string |
The generation status. Valid values:
|
true |
| ProcessId |
integer |
The asynchronous thread ID. Pass this to QueryDISyncTaskConfigProcessResult to obtain the task creation parameters. |
10 |
| Message |
string |
The error message returned on failure. Empty on success. |
XXX is invalid. |
Examples
Success response
JSON format
{
"Success": true,
"RequestId": "0bc1411515937635973****",
"Data": {
"Status": "true",
"ProcessId": 10,
"Message": "XXX is invalid."
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.DI.Parameter | The parameter is invalid. | |
| 400 | Invalid.DI.Parameter.File.Existed | The file name already exists. | |
| 500 | InternalError.DI.Parameter | A DI internal error occurred. | |
| 403 | Forbidden.DI.NoPrivilege | No access. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.