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 ID of the region in which DataWorks is activated. 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 MaxCompute table. Specify the GUID in the odps.projectName.tableName format.

ClusterId String No abc

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

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

DatabaseName String No abc

The name of the metadatabase. You can call the ListMetaDB operation to query the name of the metadatabase.

TableName String No abc

The name of the metatable.

DataSourceType String No emr

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

Extension Boolean No false

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

Response parameters

Parameter Type Example Description
Data Struct

The business data returned.

Caption String Display name

The display name of the metatable.

ClusterId String abc

The ID of the EMR cluster.

ColumnCount Integer 3

The number of fields.

Comment String test table

The comment of the metatable.

CreateTime Long 1589870294000

The time when the metatable was created.

DataSize Long 10

The amount of storage resources that are occupied by the metatable. Unit: bytes.

DatabaseName String abc

The name of the metadatabase.

EnvType Integer 1

The type of the environment. Valid values:

  • 0: indicates a metatable in the development environment.
  • 1: indicates a metatable in the production environment.
FavoriteCount Long 6

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

IsPartitionTable Boolean true

Indicates whether the metatable is partitioned. Valid values:

  • true: The metatable is partitioned.
  • false: The metatable is not partitioned.
IsView Boolean false

Indicates whether the metatable is a view. Valid values:

  • true: The metatable is a view.
  • false: The metatable is not a view.
IsVisible Integer 1

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

  • 0: indicates that the metatable is visible to workspace members.
  • 1: indicates that the metatable is visible to users within the tenant.
  • 2: indicates that the metatable is visible to all tenants.
  • 3: indicates that the metatable is visible only to 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 path of the Hive metadatabase.

OwnerId String 123

The ID of the metatable owner.

PartitionKeys String ab

The partition key of the Hive metatable.

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. This parameter is returned only when you set the Extension parameter to true and takes effect only when you set the DataSourceType parameter 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. This parameter is returned only when you set the Extension parameter to true and takes effect only when you set the DataSourceType parameter 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 call 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>
    <IsView>false</IsView>
    <LifeCycle>5</LifeCycle>
    <IsPartitionTable>true</IsPartitionTable>
    <ProjectName>test</ProjectName>
    <LastAccessTime>1589870294000</LastAccessTime>
    <LastModifyTime>1589870294000</LastModifyTime>
    <EnvType>1</EnvType>
    <OwnerId>123</OwnerId>
    <DataSize>10</DataSize>
    <PartitionKeys>ab</PartitionKeys>
    <Comment>test table</Comment>
    <ColumnCount>3</ColumnCount>
    <ClusterId>abc</ClusterId>
    <LastDdlTime>1589870294000</LastDdlTime>
    <CreateTime>1589870294000</CreateTime>
    <DatabaseName>abc</DatabaseName>
    <ProjectId>232</ProjectId>
    <ViewCount>2</ViewCount>
    <Caption>displayName</Caption>
    <TableName>table_name</TableName>
    <TenantId>12345</TenantId>
    <TableGuid>odps.engine_name.table_name</TableGuid>
    <FavoriteCount>6</FavoriteCount>
    <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": {
        "IsView": false,
        "LifeCycle": 5,
        "IsPartitionTable": true,
        "ProjectName": "test",
        "LastAccessTime": 1589870294000,
        "LastModifyTime": 1589870294000,
        "EnvType": 1,
        "OwnerId": 123,
        "DataSize": 10,
        "PartitionKeys": "ab",
        "Comment": "test table",
        "ColumnCount": 3,
        "ClusterId": "abc",
        "LastDdlTime": 1589870294000,
        "CreateTime": 1589870294000,
        "DatabaseName": "abc",
        "ProjectId": 232,
        "ViewCount": 2,
        "Caption": "Display name",
        "TableName": "table_name",
        "TenantId": 12345,
        "TableGuid": "odps.engine_name.table_name",
        "FavoriteCount": 6,
        "IsVisible": 1,
        "ReadCount": 3,
        "Location": "hdfs://"
    },
    "ErrorCode": "Invalid.Tenant.ConnectionNotExists",
    "ErrorMessage": "The connection does not exist.",
    "Success": true
}

Error codes

HttpCode Error code Error message Description
500 InternalError.System An internal system error occurred. Try again later. The error message returned because an internal 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 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 number of requests for the resource has exceeded the upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the number of requests per day for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The error message returned because the DataWorks system 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 within 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 failed to obtain a compute engine instance based on the specified MaxCompute project.
500 InternalError.Meta.TenantTimeOut Failed to connect to the interface network. The error message returned because the 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 specified table does not exist.
400 InvalidParameter.Meta.CommonError The specified parameter is invalid. The error message returned because the values specified for one or more request parameters are invalid.
400 InvalidParameter.Meta.Illegal The app guid parameter is invalid. The error message returned because the specified app GUID 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.