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

DataWorks allows you to specify a default global configuration only for the processing rules of DDL messages in synchronization solutions. After you configure the processing rules of DDL messages in synchronization solutions, the configuration is used as the default global configuration and applies to all real-time synchronization nodes in the solutions. You can modify the processing rules of DDL messages based on your business requirements. For more information about how to configure a synchronization solution, see Synchronization 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. Set the value to UpdateDIProjectConfig.

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.

DestinationType String Yes odps

The type of the destinations of the synchronization solutions. This parameter cannot be left empty.

Valid values: analyticdb_for_mysql, odps, elasticsearch, holo, mysql, and polardb.

RegionId String Yes cn-shanghai

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

SourceType String Yes mysql

The type of the sources of the synchronization solutions.

Valid values: oracle, mysql, polardb, datahub, drds, and analyticdb_for_mysql.

If you do not configure this parameter, DataWorks applies the default global configuration to all sources.

ProjectConfig String Yes {"RENAMECOLUMN":"WARNING","DROPTABLE":"WARNING","CREATETABLE":"WARNING","MODIFYCOLUMN":"WARNING","TRUNCATETABLE":"WARNING","DROPCOLUMN":"WARNING","ADDCOLUMN":"WARNING","RENAMETABLE":"WARNING"}

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

{"RENAMECOLUMN":"WARNING","DROPTABLE":"WARNING","CREATETABLE":"WARNING","MODIFYCOLUMN":"WARNING","TRUNCATETABLE":"WARNING","DROPCOLUMN":"WARNING","ADDCOLUMN":"WARNING","RENAMETABLE":"WARNING"}

Field description:

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

DataWorks processes a DDL message of a specific type based on the following rules:

  • WARNING: ignores the message and records an alert in real-time synchronization 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.
  • CRITICAL: terminates the real-time synchronization node and sets the node status to Failed.
  • NORMAL: sends the message to the destination to process the message. Each destination processes DDL messages based on its own business logic. If DataWorks adopts the NORMAL policy, DataWorks only forwards DDL messages.

Response parameters

Parameter Type Example Description
Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
RequestId String 0000-ABCD-EFG

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

Data Object -

The information about the modification.

Status String success

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

  • success: The default global configuration of synchronization solutions was modified.
  • fail: The default global configuration of synchronization solutions failed to be modified.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

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

For a list of error codes, see Service error codes.