UpdateDIProjectConfig

更新时间:
复制 MD 格式

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

Operation description

DataWorks allows you to set a default global configuration only for DDL message processing rules in synchronization solutions. This configuration 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, see Synchronization solutions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

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

10000

DestinationType

string

Yes

The destination type of the synchronization solutions. This parameter is required. Valid values: analyticdb_for_mysql, odps, elasticsearch, holo, mysql, and polardb.

odps

SourceType

string

No

The source type of the synchronization solutions. Valid values: oracle, mysql, polardb, datahub, drds, and analyticdb_for_mysql. If you leave this parameter empty, the default global configuration applies to all source types.

mysql

ProjectConfig

string

Yes

The new default global configuration for synchronization solutions, specifying the processing rules for different DDL message types. The value must be in 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 DDL messages based on the following rules:

  • WARNING: ignores the message and logs an alert in real-time synchronization logs indicating that the message was skipped due to an execution error.

  • IGNORE: discards the message and does not send it to the destination.

  • CRITICAL: terminates the real-time synchronization task and sets the node status to Failed.

  • NORMAL: forwards the message to the destination for processing. Each destination handles DDL messages based on its own business logic.

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

Response elements

Element

Type

Description

Example

object

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

RequestId

string

The request ID, which is used to locate logs and troubleshoot issues.

0000-ABCD-EFG

Data

object

The modification result.

Status

string

Whether the default global configuration was successfully modified. Valid values:

  • success

  • fail

success

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 Invalid.DI.Parameter The parameter is invalid.
500 InternalError.DI.Parameter A DI internal error occurred.
403 Forbidden.DI.NoPrivilege No access.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.