All Products
Search
Document Center

:GetMetaTableBasicInfo

最終更新日:May 06, 2024

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. Set the value to GetMetaTableBasicInfo.

TableGuid

String

Yes

odps.engine_name.table_name

The 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 is required only if you set the DataSourceType parameter to emr.

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

DatabaseName

String

No

abc

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 of the metadatabase.

TableName

String

No

abc

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 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 if you set the DataSourceType parameter to odps.

Response parameters

Parameter

Type

Example

Description

HttpStatusCode

Integer

200

The HTTP status code.

ErrorMessage

String

The connection does not exist.

The error message.

RequestId

String

0bc1411515937

The request ID.

Success

Boolean

true

Indicates whether the request was successful.

ErrorCode

String

Invalid.Tenant.ConnectionNotExists

The error code.

Data

Object

The business data.

TableName

String

table_name

The name of the metatable.

FavoriteCount

Long

6

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.

Comment

String

test table

The comment of the metatable.

ColumnCount

Integer

3

The number of fields.

CreateTime

Long

1589870294000

The time when the metatable was created.

ProjectId

Long

232

The workspace ID.

OwnerId

String

123

The ID of the metatable owner.

EnvType

Integer

1

The type of the environment. Valid values:

  • 0: development environment

  • 1: production environment

DatabaseName

String

abc

The name of the metadatabase.

IsVisible

Integer

1

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.

TableGuid

String

odps.engine_name.table_name

The GUID of the metatable.

ReadCount

Long

3

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.

ClusterId

String

abc

The ID of the EMR cluster.

IsPartitionTable

Boolean

true

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

  • true: The metatable is a partitioned table.

  • false: The metatable is a non-partitioned table.

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.

LifeCycle

Integer

5

The lifecycle of the metatable. Unit: days.

ProjectName

String

test

The name of the workspace.

ViewCount

Long

2

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.

LastAccessTime

Long

1589870294000

The time when the metatable was last accessed.

DataSize

Long

10

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

LastModifyTime

Long

1589870294000

The time when the metatable was last updated.

LastDdlTime

Long

1589870294000

The time when the schema of the metatable was last changed.

PartitionKeys

String

ab

The partition key of the Hive metatable.

Location

String

hdfs://

The storage path of the Hive metadatabase.

Caption

String

Display name

The display name of the metatable.

TenantId

Long

12345

The tenant ID.

Schema

String

default

The schema information of the metatable. This parameter is returned only if you enable the table schema in MaxCompute.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetMetaTableBasicInfo
&TableGuid=odps.engine_name.table_name
&ClusterId=abc
&DatabaseName=abc
&TableName=abc
&DataSourceType=emr
&Extension=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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" : "Display name",
    "TenantId" : 12345,
    "Schema" : "default"
  }
}

Error codes

HttpCode

Error code

Error message

Description

400

Invalid.Meta.TableNotExist

The table does not exist.

The metatable does not exist.

400

InvalidParameter.Meta.CommonError

The specified parameter is invalid.

The values specified for one or more request parameters are invalid.

400

InvalidParameter.Meta.Illegal

The app guid parameter is invalid.

The values specified for one or more parameters of the application are 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 value of the parameter for paging is invalid.

400

InternalError.UserId.Missing

An internal system error occurred. Try again later.

An internal error has occurred. Try again later.

400

InternalError.Meta.NoCalcEngine

An error occurred while retrieving the compute engine based on the MaxCompute project.

The project entered by the user is incorrect.

403

Forbidden.Meta.NoTenant

The user is not the owner of any tenants.

The current user is not a tenant owner.

403

Forbidden.Access

Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.

The required permissions are not granted.

429

Throttling.Api

The request for this resource has exceeded your available limit.

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 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 DataWorks system is busy. Try again later.

429

Throttling.User

Your request is too frequent. Try again later.

Excessive requests have been submitted within a short period of time. Try again later.

500

InternalError.System

An internal system error occurred. Try again later.

An internal error has occurred. Try again later.

500

InternalError.Meta.TenantTimeOut

Failed to connect to the interface network.

The network cannot be connected.

500

InternalError.Meta.Unknown

An unknown error occurred while processing your request.

An unknown error has occurred.

For a list of error codes, see Service error codes.

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