All Products
Search
Document Center

DataWorks:UpdateMetaEntity

Last Updated:Jun 04, 2026

Updates a metadata entity. You can update custom entities or objects of the extended table type, such as databases, tables, and columns.

Operation description

You must purchase DataWorks Professional Edition or a higher edition to use this operation.

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 syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Id

string

Yes

The ID of the entity to update. The entity name, entity type, and parent-child relationship are determined by the ID and cannot be modified using this operation.

custom_entity-customer_api:api_001

Comment

string

No

The comment on the entity.

this is a comment

Attributes

object

No

The entity attributes. Complex values must be serialized into a JSON string.

[]

string

No

The value of the entity attribute.

value

CustomAttributes

object

No

The custom attribute values. Each key specifies a custom attribute, and its value is an array that can contain at most one item. To delete an attribute value, provide an empty array.

[]

array

No

An array of custom attribute values. Currently, only single-value arrays are supported.

string

No

The custom attribute value.

张三

Custom entities

For custom entities, set EntityType to custom_entity-<name>. You can update the following items:

FieldSupportedDescription
CommentYesUpdates the entity comment.
AttributesYesThe key must be defined in the corresponding MetaEntityDef.AttributeDefs. Providing an unknown key returns an error.
CustomAttributesYesThe key must be a custom attribute that applies to this entity type.

Attribute rules

ItemDescription
Update semanticsThis is a patch operation. Only the keys provided in the request are updated. Existing attributes are retained.
Delete attributeTo delete an attribute, set its value to null. This removes the key from the entity's attributes.
Required attributeThe system returns an error if you attempt to delete or clear a required attribute.
ENUM attributeThe value must be one of the allowed values defined in AttributeDef.AllowedValues.
DATE attributeThe value must be a millisecond timestamp.
ARRAY/JSON attributeThe value must be provided as a JSON string because the API accepts all parameters as strings.

Example:

{
  "Comment": "Updated custom entity",
  "Attributes": {
    "level": "L2",
    "profile": "{\"owner\":\"data_team\"}"
  },
  "CustomAttributes": {
    "biz_owner": ["data_team"]
  }
}

Database object of the extended table type

Applies to custom_<name>-database.

Attributes keySupportedType/formatDescription
technicalMetadata.locationYesStringUpdates the storage location of the database. This corresponds to the location field in Elasticsearch.
parentMetaEntityIdNo-The parent-child relationship cannot be updated. Providing this key returns an error.
Other keysNo-For a shared entity, updating keys that are not on the whitelist returns an error.

Table object of the extended table type

Applies to custom_<name>-table.

Attributes keySupportedType/formatDescription
tableTypeYesStringUpdates the table type.
partitionKeysYesJSON array string or StringIf you provide an array, the system joins the items with commas to create the final string. For example, ["dt","hh"] becomes dt,hh.
technicalMetadata.ownerYesStringUpdates the owner.
technicalMetadata.locationYesStringUpdates the storage location.
technicalMetadata.compressedYesBooleanSupports true and false.
technicalMetadata.inputFormatYesStringUpdates the InputFormat.
technicalMetadata.outputFormatYesStringUpdates the OutputFormat.
technicalMetadata.serializationLibraryYesStringUpdates the SerDe class.
technicalMetadata.parametersYesJSON object string or StringIf you provide a JSON object, the system serializes it into a string and writes it to the parameters attribute.
parentMetaEntityIdNo-The parent database cannot be updated. Providing this key returns an error.
columnsNo-You cannot modify the column list using the UpdateMetaEntity operation. Instead, update each column entity individually.
Other keysNo-For a shared entity, updating keys that are not on the whitelist returns an error.

Example:

{
  "Comment": "Updated table description",
  "Attributes": {
    "tableType": "VIEW",
    "partitionKeys": "[\"dt\"]",
    "technicalMetadata.location": "oss://bucket/ods/order_fact",
    "technicalMetadata.compressed": "true",
    "technicalMetadata.parameters": "{\"retention\":\"30\"}"
  },
  "CustomAttributes": {
    "biz_owner": ["data_team"]
  }
}

Column object of the extended table type

Applies to custom_<name>-column.

Attributes keySupportedType/formatDescription
typeYesStringUpdates the column type.
positionYesIntegerUpdates the column position.
partitionKeyYesBooleanSets whether the column is a partition key. This corresponds to the isPartitionKey field in Elasticsearch.
primaryKeyYesBooleanSets whether the column is a primary key. This corresponds to the isPrimaryKey field in Elasticsearch.
foreignKeyYesBooleanSets whether the column is a foreign key. This corresponds to the isForeignKey field in Elasticsearch.
parentMetaEntityIdNo-The parent table cannot be updated. Providing this key returns an error.
Other keysNo-For a shared entity, updating keys that are not on the whitelist returns an error.

The request fails if the parent table does not exist, does not belong to the current tenant, or does not have inline columns.

Example:

{
  "Comment": "Order ID",
  "Attributes": {
    "type": "BIGINT",
    "position": "1",
    "primaryKey": "true"
  },
  "CustomAttributes": {
    "security_level": ["P1"]
  }
}

Unsupported operations

ItemConclusion
Modify entity nameNot supported. The name is derived from the Id.
Modify EntityTypeNot supported. The type is derived from the Id.
Modify parent entityNot supported. Providing attributes.parentMetaEntityId returns an error.
Modify column listNot supported. Providing attributes.columns returns an error.
Create new columnsNot supported. To add columns to an extended table, specify them in the Attributes.columns parameter when you create the table using the BatchCreateMetaEntities operation.

Response elements

Element

Type

Description

Example

object

The data returned in the response.

RequestId

string

The ID of the request.

AASFDFSDFG-DFSDF-DFSDFD-SDFSDF

Success

boolean

Indicates whether the request was successful.

true

Result

object

The result of the update operation.

Id

string

The ID of the entity.

custom_entity-customer_api:api_001

Success

boolean

Indicates whether the update was successful.

true

Examples

Success response

JSON format

{
  "RequestId": "AASFDFSDFG-DFSDF-DFSDFD-SDFSDF",
  "Success": true,
  "Result": {
    "Id": "custom_entity-customer_api:api_001",
    "Success": true
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.