All Products
Search
Document Center

DataWorks:GenerateDISyncTaskConfigForUpdating

Last Updated:Sep 18, 2024

Generates the JSON for an asynchronous thread that is used to update a real-time synchronization task in Data Integration.

Operation description

DataWorks allows you to use only the UpdateDISyncTask operation to update a batch synchronization task in Data Integration. To update a real-time synchronization task, you must first call the GenerateDISyncTaskConfigForUpdating operation to generate the ID of an asynchronous thread and call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. Then, you can call the UpdateDISyncTask operation and use the parameters as request parameters to update a real-time synchronization task in Data Integration. DataWorks allows you to create or update real-time synchronization tasks in Data Integration only in asynchronous mode.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongYes

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to obtain the workspace ID.

You must configure this parameter to specify the DataWorks workspace to which the API operation is applied.

10000
TaskTypestringYes

The type of the object that you want to update in Data Integration in asynchronous mode. Valid values:

  • DI_REALTIME: real-time synchronization task
  • DI_SOLUTION: synchronization solution DataWorks allows you to create or update real-time synchronization tasks in Data Integration only in asynchronous mode.

Valid values:

  • DI_OFFLINE
  • DI_REALTIME
  • DI_SOLUTION
DI_REALTIME
TaskParamstringYes

The script for updating the real-time synchronization task in Data Integration. DataWorks allows you to add or remove tables for a real-time synchronization task in Data Integration only in asynchronous mode. The following types of real-time synchronization tasks are supported:

  • Synchronization task that is used to synchronize data from MySQL to MaxCompute
  • Synchronization task that is used to synchronize data from MySQL data to Kafka
  • Synchronization task that is used to synchronize data from MySQL to Hologres

The SelectedTables parameter is used to specify tables that you want to synchronize from multiple databases. The Tables parameter is used to specify tables that you want to synchronize from a single database.

  • If the script contains the SelectedTables parameter, the system synchronizes data from the tables that you specify in the SelectedTables parameter.
  • If the script contains the Tables parameter, the system synchronizes data from the tables that you specify in the Tables parameter.
{ "steps": [ { "parameter": { "connection": [ { "table": [ "xyx" ] } ] }, "name": "Reader", "category": "reader" } ] }
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. This parameter is used to prevent repeated operations that are caused by multiple calls.

ABFUOEUOTRTRJKE
TaskIdlongYes

The task ID.

  • If you set the TaskType parameter to DI_REALTIME, set the TaskId parameter to the value of the FileId parameter for the real-time synchronization task.
  • If you set the TaskType parameter to DI_SOLUTION, set the TaskId parameter to the value of the FileId parameter for the synchronization solution.
100

Response parameters

ParameterTypeDescriptionExample
object

The returned results.

Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
RequestIdstring

The request ID. You can locate logs and troubleshoot issues based on the ID.

0bc1411515937635973****
Dataobject

The information returned for the ID of the asynchronous thread.

Statusstring

Indicates whether the ID of the asynchronous thread is generated. Valid values:

  • success: indicates that the ID of the asynchronous thread is generated.
  • fail: indicates that the ID of the asynchronous thread fails to be generated. You can view the reason for the failure and troubleshoot the issue based on the reason.
true
ProcessIdlong

The ID of the asynchronous thread. You can call the QueryDISyncTaskConfigProcessResult operation to obtain the asynchronously generated parameters based on the ID. The parameters are used to update a real-time synchronization task in Data Integration.

10
Messagestring

The reason why the ID of the asynchronous thread fails to be generated. If the ID is successfully generated, no value is returned for this parameter.

XXX is invalid.

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "RequestId": "0bc1411515937635973****",
  "Data": {
    "Status": "true",
    "ProcessId": 10,
    "Message": "XXX is invalid."
  }
}

Error codes

HTTP status codeError codeError message
400Invalid.DI.ParameterThe parameter is invalid.
400Invalid.DI.Parameter.File.ExistedThe file name already exists.
403Forbidden.DI.NoPrivilegeNo access.
500InternalError.DI.ParameterA DI internal error occurred.

For a list of error codes, visit the Service error codes.