All Products
Search
Document Center

DataWorks:GetMetaTableBasicInfo

Last Updated:Dec 26, 2024

Queries the basic information about a metatable.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*get
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TableGuidstringYes

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
ClusterIdstringNo

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
DatabaseNamestringNo

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
TableNamestringNo

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
DataSourceTypestringNo

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

emr
ExtensionbooleanNo

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 parameters

ParameterTypeDescriptionExample
object

The response parameters.

HttpStatusCodeinteger

The HTTP status code.

200
ErrorMessagestring

The error message.

The connection does not exist.
RequestIdstring

The request ID.

0bc1411515937
Successboolean

Indicates whether the request was successful.

true
ErrorCodestring

The error code.

Invalid.Tenant.ConnectionNotExists
Dataobject

The business data.

TableNamestring

The name of the metatable.

table_name
FavoriteCountlong

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
Commentstring

The comment of the metatable.

test table
ColumnCountinteger

The number of fields.

3
CreateTimelong

The time when the metatable was created.

1589870294000
ProjectIdlong

The workspace ID.

232
OwnerIdstring

The ID of the metatable owner.

123
EnvTypeinteger

The type of the environment. Valid values:

  • 0: development environment
  • 1: production environment
1
DatabaseNamestring

The name of the metadatabase.

abc
IsVisibleinteger

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
TableGuidstring

The GUID of the metatable.

odps.engine_name.table_name
ReadCountlong

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
ClusterIdstring

The ID of the EMR cluster.

abc
IsPartitionTableboolean

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

  • true
  • false
true
IsViewboolean

Indicates whether the metatable is a view. Valid values:

  • true
  • false
false
LifeCycleinteger

The lifecycle of the metatable. Unit: days.

5
ProjectNamestring

The name of the workspace.

test
ViewCountlong

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
LastAccessTimelong

The time when the metatable was last accessed.

1589870294000
DataSizelong

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

10
LastModifyTimelong

The time when the metatable was last updated.

1589870294000
LastDdlTimelong

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

1589870294000
PartitionKeysstring

The partition key of the Hive metatable.

ab
Locationstring

The storage path of the Hive metadatabase.

hdfs://
Captionstring

The display name of the metatable.

test
TenantIdlong

The tenant ID.

12345
Schemastring

The schema information of the metatable. This parameter is returned if the three-layer model of MaxCompute is enabled.

default

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400Invalid.Meta.TableNotExistThe table does not exist.The table does not exist.
400InvalidParameter.Meta.CommonErrorThe specified parameter is invalid.The request parameter is invalid.
400InvalidParameter.Meta.IllegalThe app guid parameter is invalid.The app guid parameter is invalid.
400InvalidParameter.Meta.IllegalDateThe date format is invalid.The date format is invalid.
400InvalidParameter.Meta.IllegalPageErrorThe parameter for paging is invalid.The parameter for paging is invalid.
400InvalidParameter.Meta.NotExistThe object does not exist.-
400InternalError.UserId.MissingAn internal system error occurred. Try again later.-
400InternalError.Meta.NoCalcEngineAn error occurred while retrieving the compute engine based on the MaxCompute project.Incorrect project entered by user
403Forbidden.Meta.NoTenantThe user is not the owner of any tenants.The user is not the owner of any tenants.
403Forbidden.AccessAccess is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.No permission, please authorize
429Throttling.ApiThe request for this resource has exceeded your available limit.-
429Throttling.Api.RiskThe request for this resource has exceeded your daily available limit.-
429Throttling.SystemThe DataWorks system is busy. Try again later.-
429Throttling.UserYour request is too frequent. Try again later.-
500InternalError.SystemAn internal system error occurred. Try again later.-
500InternalError.Meta.TenantTimeOutFailed to connect to the interface network.Failed to connect to the interface network.
500InternalError.Meta.UnknownAn unknown error occurred while processing your request.An unknown error occurred while processing your request.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history