Modifies the default global configuration of sync solutions in a specified DataWorks workspace.

DataWorks allows you to set the default global configuration for only the processing rules of DDL messages in sync solutions. After you configure the processing rules of DDL messages in sync solutions, the configuration is set as the default global configuration and applies to all real-time sync nodes. You can also modify the processing rules of DDL messages based on your business requirements. For more information, see Sync solutions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateDIProjectConfig

The operation that you want to perform.

DestinationType String Yes odps

The type of the destination data source of the sync solution. This parameter cannot be left empty.

Valid values: analyticdb_for_mysql, odps, elasticsearch, holo, mysql, and polardb. You can call this operation to modify the default global configuration of sync solutions that use these types of destination data sources.

ProjectConfig String Yes null

The updated default global configuration of sync solutions. The value indicates the processing rules of different types of DDL messages. The value must be in the JSON format. Example:

null

Field description:

  • RENAMECOLUMN: renames the column.
  • DROPTABLE: deletes the table.
  • CREATETABLE: creates a table.
  • MODIFYCOLUMN: changes the column data type.
  • TRUNCATETABLE: clears the table.
  • DROPCOLUMN: deletes the column.
  • ADDCOLUMN: creates a column.
  • RENAMETABLE: renames the table.

DataWorks processes a DDL message of a specific type based on the following policies after it receives the message:

  • WARNING: ignores the message and records an alert in real-time sync logs. The alert contains information about the situation that the message is ignored because of an execution error.
  • IGNORE: discards the message and does not send it to the destination data source.
  • CRITICAL: terminates the real-time sync node and sets the node status to Failed.
  • NORMAL: sends the message to the destination data source to process the message. Each destination data source may process DDL messages based on its own business logic. If DataWorks adopts the NORMAL policy, DataWorks only forwards DDL messages.
ProjectId Long Yes 10000

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

RegionId String Yes cn-shanghai

The ID of the region in which the sync solution resides. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint used to call the operation.

SourceType String No mysql

The type of the source data source of the sync solution.

Valid values: oracle, mysql, polardb, datahub, drds, and analyticdb_for_mysql. You can call this operation to modify the default global configuration of sync solutions that use these types of source data sources.

If you do not set this parameter, DataWorks applies the updated default global configuration to all the source data sources of the preceding types.

Response parameters

Parameter Type Example Description
Data Struct

The information about the modification.

Status String success

Indicates whether the default global configuration of sync solutions was modified. Valid values:

  • success: The default global configuration of sync solutions was modified.
  • fail: The default global configuration of sync solutions failed to be modified.
RequestId String 0000-ABCD-EFG

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

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateDIProjectConfig
&DestinationType=odps
&ProjectConfig={"RENAMECOLUMN":"WARNING","DROPTABLE":"WARNING","CREATETABLE":"WARNING","MODIFYCOLUMN":"WARNING","TRUNCATETABLE":"WARNING","DROPCOLUMN":"WARNING","ADDCOLUMN":"WARNING","RENAMETABLE":"WARNING"}
&ProjectId=10000
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG	</RequestId>
<Data>
    <Status>success</Status>
</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG",
    "Data": {
        "Status": "success"
    },
    "Success": true
}

Error codes

Http status code Error code Error message Description
403 Forbidden.DI.NoPrivilege No access. The error message returned because you do not have the required permissions.
500 InternalError.DI.Parameter A DI internal error occurred. The error message returned because an internal error in Data Integration occurred.
400 Invalid.DI.Parameter The parameter is invalid. The error code returned because one or more parameters are invalid.

For a list of error codes, visit the API Error Center.