All Products
Search
Document Center

DataWorks:ListDIProjectConfig

Last Updated:Oct 17, 2024

Queries the default global configurations of synchronization solutions in a specified DataWorks workspace.

Operation description

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 tasks 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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectIdlongYes

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

1000
DestinationTypestringYes

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.

elasticsearch
SourceTypestringNo

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.

mysql

Response parameters

ParameterTypeDescriptionExample
object
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
RequestIdstring

The request ID.

0000-ABCD-EFG
Dataobject

The information about the query.

Configstring

The default global configuration of synchronization 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 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.
{"RENAMECOLUMN":"WARNING","DROPTABLE":"WARNING","CREATETABLE":"WARNING","MODIFYCOLUMN":"WARNING","TRUNCATETABLE":"WARNING","DROPCOLUMN":"WARNING","ADDCOLUMN":"WARNING","RENAMETABLE":"WARNING"}

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400Invalid.DI.ParameterThe parameter is invalid.
403Forbidden.DI.NoPrivilegeNo access.
500InternalError.DI.ParameterA DI internal error occurred.

For a list of error codes, visit the Service error codes.