All Products
Search
Document Center

DataWorks:GetMetaTableBasicInfo

Last Updated:Mar 30, 2026

Queries the 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 GUID of the MaxCompute table. Specify the GUID in the odps.projectName.tableName format.

Note

This parameter is optional for E-MapReduce (EMR) tables.

odps.engine_name.table_name

ClusterId

string

No

The ID of the EMR cluster. This parameter is required only if you set the DataSourceType parameter to emr.

You can log on to the EMR console to query the ID.

abc

DatabaseName

string

No

The name of the metadatabase. This parameter is required only if you set the DataSourceType parameter to emr.

You can call the ListMetaDB operation to query the name.

abc

TableName

string

No

The name of the metatable in the EMR cluster. This parameter is required only if you set the DataSourceType parameter to emr.

You can call the GetMetaDBTableList operation to query the name.

abc

DataSourceType

string

No

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

emr

Extension

boolean

No

Specifies whether to include extended fields in query results. The extended fields include ReadCount, FavoriteCount, and ViewCount. This parameter takes effect only if you set the DataSourceType parameter 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

Indicates whether the request was successful.

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 added to a favorite list. This parameter is returned only if you set the Extension parameter to true and takes effect only if you set the DataSourceType parameter to odps.

6

Comment

string

The comment of the metatable.

test table

ColumnCount

integer

The number of fields.

3

CreateTime

integer

The time when the metatable was created.

1589870294000

ProjectId

integer

The workspace ID.

232

OwnerId

string

The ID of the metatable owner.

123

EnvType

integer

The type of the environment. Valid values:

  • 0: development environment

  • 1: production environment

1

DatabaseName

string

The name of the metadatabase.

abc

IsVisible

integer

The scope in which the metatable is visible. Valid values:

  • 0: The metatable is visible to workspace members.

  • 1: The metatable is visible to users within the tenant.

  • 2: The metatable is visible to all tenants.

  • 3: The metatable is visible only to the metatable owner.

1

TableGuid

string

The GUID of the metatable.

odps.engine_name.table_name

ReadCount

integer

The number of times the metatable was read. This parameter is returned only if you set the Extension parameter to true and takes effect only if you set the DataSourceType parameter to odps.

3

ClusterId

string

The ID of the EMR cluster.

abc

IsPartitionTable

boolean

Indicates whether the metatable is a partitioned table. Valid values:

  • true

  • false

true

IsView

boolean

Indicates whether the metatable is a view. Valid values:

  • true

  • false

false

LifeCycle

integer

The lifecycle of the table. Unit: day.

Note

If the lifecycle is not set for a MaxCompute table, the return value is 0, indicating that the table is permanently valid.

5

ProjectName

string

The name of the workspace.

test

ViewCount

integer

The number of times the metatable was viewed. This parameter is returned only if you set the Extension parameter to true and takes effect only if you set the DataSourceType parameter to odps.

2

LastAccessTime

integer

The time when the metatable was last accessed.

1589870294000

DataSize

integer

The size of storage space that is occupied by the metatable. Unit: bytes.

10

LastModifyTime

integer

The time when the metatable was last updated.

1589870294000

LastDdlTime

integer

The time when the schema of the metatable was last 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 information of the metatable. This parameter is returned if the three-layer model of MaxCompute 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.