All Products
Search
Document Center

DataWorks:GetMetaTableBasicInfo

Last Updated:Aug 20, 2026

Queries basic information about a metatable.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TableGuid

string

No

The MaxCompute table GUID. Format: odps.projectName.tableName.

Note

Optional for EMR tables.

odps.engine_name.table_name

ClusterId

string

No

The EMR cluster ID. Required only when DataSourceType is set to emr.

Obtain the ID from the EMR console.

abc

DatabaseName

string

No

The metadatabase name. Required only when DataSourceType is set to emr.

Call the ListMetaDB operation to query the name.

abc

TableName

string

No

The metatable name in the EMR cluster. Required only when DataSourceType is set to emr.

Call the GetMetaDBTableList operation to query the name.

abc

DataSourceType

string

No

The data source type. Valid values: odps and emr.

emr

Extension

boolean

No

Whether to include extended fields (ReadCount, FavoriteCount, ViewCount) in results. Takes effect only when DataSourceType is set to odps.

false

Response elements

Element

Type

Description

Example

object

The response.

HttpStatusCode

integer

The HTTP status code.

200

ErrorMessage

string

The error message.

The connection does not exist.

RequestId

string

The request ID.

0bc1411515937

Success

boolean

Whether the request succeeded.

true

ErrorCode

string

The error code.

Invalid.Tenant.ConnectionNotExists

Data

object

The business data.

TableName

string

The name of the metatable.

table_name

FavoriteCount

integer

The number of times the metatable was favorited. Returned only when Extension is true and DataSourceType is odps.

6

Comment

string

The comment of the metatable.

test table

ColumnCount

integer

The number of fields.

3

CreateTime

integer

The creation time of the metatable.

1589870294000

ProjectId

integer

The workspace ID.

232

OwnerId

string

The ID of the metatable owner.

123

EnvType

integer

The environment type. Valid values:

  • 0: development environment

  • 1: production environment

1

DatabaseName

string

The name of the metadatabase.

abc

IsVisible

integer

The visibility scope of the metatable. Valid values:

  • 0: visible to workspace members.

  • 1: visible to users within the tenant.

  • 2: visible to all tenants.

  • 3: visible only to the metatable owner.

1

TableGuid

string

The GUID of the metatable.

odps.engine_name.table_name

ReadCount

integer

The read count of the metatable. Returned only when Extension is true and DataSourceType is odps.

3

ClusterId

string

The ID of the EMR cluster.

abc

IsPartitionTable

boolean

Whether the metatable is partitioned. Valid values:

  • true

  • false

true

IsView

boolean

Whether the metatable is a view. Valid values:

  • true

  • false

false

LifeCycle

integer

The lifecycle of the table. Unit: days.

Note

A value of 0 indicates that no lifecycle is set and the MaxCompute table is permanently valid.

5

ProjectName

string

The name of the workspace.

test

ViewCount

integer

The view count of the metatable. Returned only when Extension is true and DataSourceType is odps.

2

LastAccessTime

integer

The last time the metatable was accessed.

1589870294000

DataSize

integer

The storage size of the metatable. Unit: bytes.

10

LastModifyTime

integer

The last time the metatable was modified.

1589870294000

LastDdlTime

integer

The last time the metatable schema was changed.

1589870294000

PartitionKeys

string

The partition key of the Hive metatable.

ab

Location

string

The storage path of the Hive metadatabase.

hdfs://

Caption

string

The display name of the metatable.

China name

TenantId

integer

The tenant ID.

12345

Schema

string

The schema of the metatable. Returned only when the MaxCompute three-layer model is enabled.

default

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The connection does not exist.",
  "RequestId": "0bc1411515937",
  "Success": true,
  "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
  "Data": {
    "TableName": "table_name",
    "FavoriteCount": 6,
    "Comment": "test table",
    "ColumnCount": 3,
    "CreateTime": 1589870294000,
    "ProjectId": 232,
    "OwnerId": "123",
    "EnvType": 1,
    "DatabaseName": "abc",
    "IsVisible": 1,
    "TableGuid": "odps.engine_name.table_name",
    "ReadCount": 3,
    "ClusterId": "abc",
    "IsPartitionTable": true,
    "IsView": false,
    "LifeCycle": 5,
    "ProjectName": "test",
    "ViewCount": 2,
    "LastAccessTime": 1589870294000,
    "DataSize": 10,
    "LastModifyTime": 1589870294000,
    "LastDdlTime": 1589870294000,
    "PartitionKeys": "ab",
    "Location": "hdfs://",
    "Caption": "China name",
    "TenantId": 12345,
    "Schema": "default"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Invalid.Meta.TableNotExist The table does not exist. The table does not exist.
400 InvalidParameter.Meta.CommonError The specified parameter is invalid. The request parameter is invalid.
400 InvalidParameter.Meta.Illegal The app guid parameter is invalid. The app guid parameter is invalid.
400 InvalidParameter.Meta.IllegalDate The date format is invalid. The date format is invalid.
400 InvalidParameter.Meta.IllegalPageError The parameter for paging is invalid. The parameter for paging is invalid.
400 InvalidParameter.Meta.NotExist The object does not exist.
400 InternalError.UserId.Missing An internal system error occurred. Try again later.
400 InternalError.Meta.NoCalcEngine An error occurred while retrieving the compute engine based on the MaxCompute project. Incorrect project entered by user
500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.Meta.TenantTimeOut Failed to connect to the interface network. Failed to connect to the interface network.
500 InternalError.Meta.Unknown An unknown error occurred while processing your request. An unknown error occurred while processing your request.
403 Forbidden.Meta.NoTenant The user is not the owner of any tenants. The user is not the owner of any tenants.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.