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
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:
DataWorks processes a DDL message of a specific type based on the following rules:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
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:
|
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.