Retrieves complete metadata for a table, including field details.
This API has been deprecated with no replacement. While temporary access is maintained, no further updates or bug fixes will be provided. To ensure continued functionality, plan your migration and contact your account manager for support.
Operation description
You can call this operation to query only the information about a table of the E-MapReduce (EMR) compute engine type.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TableGuid |
string |
No |
The unique identifier of the table. You can call the GetMetaDBTableList operation to query the unique identifier of the table. |
odps.engine_name.table_name |
| PageNum |
integer |
No |
The page number requested for pagination. |
1 |
| PageSize |
integer |
No |
The number of items per page, with a default of 10 and a maximum of 100. |
10 |
| 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. |
C-010A704DA760**** |
| DatabaseName |
string |
No |
The name of the database. This parameter is required only if you set the DataSourceType parameter to emr. You can call the ListMetaDB operation to query the database name. |
abc |
| TableName |
string |
No |
The name of the table 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 table name. |
abc |
| DataSourceType |
string |
No |
The type of the data source. Set the value to emr. |
emr |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
The specified parameters are invalid. |
| RequestId |
string |
The request ID. |
0bc1411515937**** |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| ErrorCode |
string |
The error code. |
1031203110005 |
| Data |
object |
The business data. |
|
| TableName |
string |
The name of the table. |
table_name |
| Comment |
string |
The comment on the table. |
comment |
| LifeCycle |
integer |
The lifecycle of the table. Unit: days. |
5 |
| CreateTime |
integer |
The time when the table was created. A timestamp is returned for this parameter. You can convert the timestamp to the related date based on the time zone that you use. |
1589870293000 |
| ProjectName |
string |
The name of the workspace to which the table belongs. |
test |
| ProjectId |
integer |
The ID of the workspace to which the table belongs. |
22 |
| OwnerId |
string |
The ID of the table owner. |
123 |
| EnvType |
integer |
The type of the environment. Valid values:
|
1 |
| LastAccessTime |
integer |
The time when the table was last accessed. A timestamp is returned for this parameter. You can convert the timestamp to the related date based on the time zone that you use. |
1589870294000 |
| DataSize |
integer |
The size of the storage space that is consumed by the table. Unit: bytes. |
10 |
| LastModifyTime |
integer |
The time when the table was last updated. A timestamp is returned for this parameter. You can convert the timestamp to the related date based on the time zone that you use. |
1589870294000 |
| DatabaseName |
string |
The name of the database. |
abc |
| IsVisible |
integer |
The scope in which the table is visible. Valid values:
|
1 |
| TotalColumnCount |
integer |
The total number of fields. |
22 |
| TableGuid |
string |
The unique identifier of the table. |
odps.engine_name.table_name |
| PartitionKeys |
string |
The partition key column. |
abc |
| LastDdlTime |
integer |
The time when the schema of the table was last changed. A timestamp is returned for this parameter. You can convert the timestamp to the related date based on the time zone that you use. |
1589870294000 |
| Location |
string |
The storage path of the Hive table. |
hdfs://localhost:777/user/hadoop/test.txt |
| ClusterId |
string |
The EMR cluster ID. |
C-010A704DA760**** |
| TenantId |
integer |
The tenant ID. |
12345 |
| Schema |
string |
The schema information of the table. |
default |
| ColumnList |
array<object> |
The fields in the table. |
|
|
object |
The field in the table. |
||
| ColumnName |
string |
The name of the field. |
1 |
| ColumnGuid |
string |
The unique identifier of the field. |
odps.engine_name.table_name.1 |
| IsPartitionColumn |
boolean |
Indicates whether the field is a partition field. Valid values:
|
true |
| Comment |
string |
The remarks of the field. |
comment |
| ColumnType |
string |
The data type of the field. |
string |
| IsPrimaryKey |
boolean |
Indicates whether the field is a primary key. Valid values:
|
false |
| Position |
integer |
The sequence number of the field. |
1 |
| Caption |
string |
The description of the field. |
data comment |
| IsForeignKey |
boolean |
Indicates whether the field is a foreign key. Valid values:
|
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"ErrorMessage": "The specified parameters are invalid.",
"RequestId": "0bc1411515937****",
"Success": true,
"ErrorCode": "1031203110005",
"Data": {
"TableName": "table_name",
"Comment": "comment",
"LifeCycle": 5,
"CreateTime": 1589870293000,
"ProjectName": "test",
"ProjectId": 22,
"OwnerId": "123",
"EnvType": 1,
"LastAccessTime": 1589870294000,
"DataSize": 10,
"LastModifyTime": 1589870294000,
"DatabaseName": "abc",
"IsVisible": 1,
"TotalColumnCount": 22,
"TableGuid": "odps.engine_name.table_name",
"PartitionKeys": "abc",
"LastDdlTime": 1589870294000,
"Location": "hdfs://localhost:777/user/hadoop/test.txt",
"ClusterId": "C-010A704DA760****",
"TenantId": 12345,
"Schema": "default",
"ColumnList": [
{
"ColumnName": "1",
"ColumnGuid": "odps.engine_name.table_name.1",
"IsPartitionColumn": true,
"Comment": "comment",
"ColumnType": "string",
"IsPrimaryKey": false,
"Position": 1,
"Caption": "data comment",
"IsForeignKey": true
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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.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.UserId.Missing | 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.