Queries 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 ListDIProjectConfig

The operation that you want to perform.

DestinationType String Yes elasticsearch

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 the ListDIProjectConfig operation to query the supported types of destination data sources.

ProjectId Long Yes 1000

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 Yes 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 the ListDIProjectConfig operation to query the supported types of source data sources.

If you do not set this parameter, DataWorks applies the 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 query operation.

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

The default global configuration of sync solutions. The value indicates the processing rules of different types of DDL messages. Example:

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

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.
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=ListDIProjectConfig
&DestinationType=elasticsearch
&ProjectId=1000
&RegionId=cn-shanghai
&SourceType=mysql
&<Common request parameters>

Sample success responses

XML format

<RequestId>0000-ABCD-EFG	</RequestId>
<Data>
    <Config>{"RENAMECOLUMN":"WARNING","DROPTABLE":"WARNING","CREATETABLE":"WARNING","MODIFYCOLUMN":"WARNING","TRUNCATETABLE":"WARNING","DROPCOLUMN":"WARNING","ADDCOLUMN":"WARNING","RENAMETABLE":"WARNING"}</Config>
</Data>
<Success>true</Success>

JSON format

{
    "RequestId": "0000-ABCD-EFG",
    "Data": {
        "Config": "{\"RENAMECOLUMN\":\"WARNING\",\"DROPTABLE\":\"WARNING\",\"CREATETABLE\":\"WARNING\",\"MODIFYCOLUMN\":\"WARNING\",\"TRUNCATETABLE\":\"WARNING\",\"DROPCOLUMN\":\"WARNING\",\"ADDCOLUMN\":\"WARNING\",\"RENAMETABLE\":\"WARNING\"}"
    },
    "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.