Queries the basic information about a metatable.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetMetaTableBasicInfo

The operation that you want to perform.

RegionId String Yes cn-shanghai

The region ID of the workspace. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint that is used to call the operation.

TableGuid String Yes odps.engine_name.table_name

The globally unique identifier (GUID) of the table. The value of this parameter is in the odps.projectName.tableName format.

ClusterId String No abc

The ID of the E-MapReduce (EMR) cluster. This parameter must be specified when DataSourceType is set to emr.

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

DatabaseName String No abc

The name of the database. You can call the ListMetaDB operation to obtain the name.

TableName String No abc

The name of the metatable.

DataSourceType String No emr

The data type. Valid values: odps and emr.

Extension Boolean No false

Specifies whether extended fields are included in query results. The extended fields include ReadCount, FavoriteCount, and ViewCount. This parameter only takes effect when DataSourceType is set to odps.

Response parameters

Parameter Type Example Description
Data Struct

Business data.

Caption String Display name

The display name of the metatable.

ClusterId String abc

The ID of the EMR cluster.

Comment String test table

The comment of the metatable.

CreateTime Long 1589870294000

The time when the metatable was created.

DataSize Long 10

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

DatabaseName String abc

The name of the database.

EnvType Integer 1

The environment type. Valid values:

  • 0: development environment
  • 1: production environment
FavoriteCount Long 6

The number of times the metatable was added to a favorite list. This parameter is returned only when the Extension parameter is set to true and only takes effect when the DataSourceType parameter is set to odps.

IsPartitionTable Boolean true

Indicates whether the metatable is a partitioned table.

IsVisible Integer 1

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

  • 0: workspace members
  • 1: users within the tenant
  • 2: all tenants
  • 3: the metatable owner
LastAccessTime Long 1589870294000

The time when the metatable was last accessed.

LastDdlTime Long 1589870294000

The time when the schema was last changed.

LastModifyTime Long 1589870294000

The time when the metatable was last updated.

LifeCycle Integer 5

The lifecycle of the metatable. Unit: days.

Location String hdfs://

The storage location of the Hive database.

OwnerId String 123

The ID of the metatable owner.

PartitionKeys String ab

The Hive partition.

ProjectId Long 232

The ID of the workspace.

ProjectName String test

The name of the workspace.

ReadCount Long 3

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

TableGuid String odps.engine_name.table_name

The GUID of the metatable.

TableName String table_name

The name of the metatable.

TenantId Long 12345

The ID of the tenant.

ViewCount Long 2

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

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

ErrorMessage String The connection does not exist.

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String 0bc1411515937

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetMetaTableBasicInfo
&RegionId=cn-shanghai
&TableGuid=odps.engine_name.table_name
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

HTTP status code Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal system error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. The error message returned because an internal system error has occurred. Try again later.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the maximum number of requests for the resource has been reached.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the maximum number of requests per day for the resource has been reached.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because DataWorks is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. The error message returned because excessive requests have been submitted in a short period of time. Try again later.
403 Forbidden.Meta.NoTenant The user is not the owner of any tenants. The error message returned because the current user is not a tenant owner.
500 InternalError.Meta.NoCalcEngine An error occurred while retrieving the compute engine based on the MaxCompute project. The error message returned because the system has failed to obtain the compute engine instance based on the MaxCompute project {0}.
500 InternalError.Meta.TenantTimeOut Failed to connect to the interface network. The error message returned because the interface network cannot be connected.
500 InternalError.Meta.Unknown An unknown error occurred while processing your request. The error message returned because an unknown error has occurred.
400 Invalid.Meta.TableNotExist The table does not exist. The error message returned because the metatable does not exist.
400 InvalidParameter.Meta.CommonError The specified parameter is invalid. The error message returned because one or more request parameters are invalid.
400 InvalidParameter.Meta.Illegal The app guid parameter is invalid. The error message returned because the value of the AppGuid parameter is invalid.
400 InvalidParameter.Meta.IllegalDate The date format is invalid. The error message returned because the date format is invalid.
400 InvalidParameter.Meta.IllegalPageError The parameter for paging is invalid. The error message returned because the value of the parameter for paging is invalid.
400 InvalidParameter.Meta.NotExist The object does not exist. The error message returned because the object that you query does not exist.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition.

For a list of error codes, visit the API Error Center.

For more information about the example on how to use the GetMetaTableBasicInfo operation, see Examples of DataWorks API operations.