GenerateDISyncTaskConfigForUpdating

Updated at:

Asynchronously generates the JSON configuration for updating a synchronization task.

Operation description

DataWorks currently supports directly calling the UpdateDISyncTask operation to update data integration offline synchronization tasks. To update a data integration real-time synchronization task, you must first call the GenerateDISyncTaskConfigForUpdating and QueryDISyncTaskConfigProcessResult operations to asynchronously generate the parameters required for the update. Then, pass the generated parameters as input to the UpdateDISyncTask operation to update the real-time synchronization task. You can only use the asynchronous method to update data integration real-time synchronization tasks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

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

This parameter determines the DataWorks workspace in which the API operation is called.

10000

TaskType

string

Yes

The type of the Data Integration synchronization task to be updated asynchronously. Valid values:

  • DI_REALTIME: real-time synchronization task.

  • DI_SOLUTION: solution synchronization task. Only real-time and solution synchronization tasks can be updated asynchronously.

Valid values:

  • DI_REALTIME :

    Real-time synchronization task.

  • DI_SOLUTION :

    Solution synchronization task.

  • DI_OFFLINE :

    Offline synchronization task.

DI_REALTIME

TaskParam

string

Yes

The script statements for updating the synchronization task. Currently, the asynchronous method only supports adding or removing tables for data integration synchronization tasks. Only the following types of synchronization tasks can be updated:

  • Synchronizing MySQL data to MaxCompute.

  • Synchronizing MySQL data to Kafka.

  • Synchronizing MySQL data to Hologres.

In a synchronization task, SelectedTables is used to select tables in multi-database mode, and Tables is used to select tables in single-database mode.

  • If the script contains the SelectedTables statement, the system uses the table information in the SelectedTables statement for synchronization.

  • If the script contains the Tables statement, the system uses the field information in the Tables statement for synchronization.

{"steps":[{"parameter":{"connection":[{"table":["xyx"]}]},"name":"Reader","category":"reader"}]}

ClientToken

string

No

The client token that is used to ensure idempotence. This parameter prevents duplicate operations caused by multiple calls.

ABFUOEUOTRTRJKE

TaskId

integer

Yes

The task ID.

  • If TaskType is set to DI_REALTIME, TaskId is the FileId of the real-time synchronization task.

  • If TaskType is set to DI_SOLUTION, TaskId is the FileId of the solution synchronization task.

100

Response elements

Element

Type

Description

Example

object

The response.

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

RequestId

string

The request ID. You can use this ID to locate logs and troubleshoot issues.

0bc1411515937635973****

Data

object

The result of generating the asynchronous thread ID.

Status

string

The status of generating the asynchronous thread ID. Valid values:

  • success: The asynchronous thread ID was generated.

  • fail: The asynchronous thread ID failed to be generated. You can view the cause of the failure and resolve the issue.

true

ProcessId

integer

The asynchronous thread ID. You must use this ID to call the QueryDISyncTaskConfigProcessResult operation to obtain the parameters required for asynchronously updating the data integration synchronization task, and then use the parameters to update the task.

10

Message

string

The reason why the asynchronous thread ID failed to be generated. If the asynchronous thread ID is generated, this parameter is left empty.

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. The parameter is invalid.
400 Invalid.DI.Parameter.File.Existed The file name already exists. The parameter is invalid. The file name already exists.
500 InternalError.DI.Parameter A DI internal error occurred. A Data Integration internal business error occurred.
403 Forbidden.DI.NoPrivilege No access. Access denied.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.