GetMetaTableBasicInfo
Retrieves the basic information of a table.
Operation description
Prerequisites: Before you call this operation, activate DataWorks Enterprise Edition or Ultimate Edition. If you do not activate either edition, the service returns a 403 Forbidden.Access error.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TableGuid |
string |
Yes |
The unique identifier of the MaxCompute table. The format is odps.projectName.tableName. Note
In EMR scenarios, this parameter is optional. |
odps.engine_name.table_name |
| ClusterId |
string |
No |
The ID of the EMR cluster. This parameter is required when DataSourceType is set to EMR. You can log on to the EMR console to obtain the cluster ID. |
abc |
| DatabaseName |
string |
No |
The name of the database. This parameter is required only when the data source type is EMR. You can call the ListMetaDB operation to obtain the database name. |
abc |
| TableName |
string |
No |
The name of the EMR table. This parameter is required only when the data source type is EMR. You can call the GetMetaDBTableList operation to obtain the table name. |
abc |
| DataSourceType |
string |
No |
The data source type. Valid values: odps and emr. |
emr |
| Extension |
boolean |
No |
Specifies whether to include extended fields. Extended fields include the number of reads, favorites, and views. This parameter takes effect only when the data source type is ODPS. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
The connection does not exist. |
| RequestId |
string |
The request ID. |
0bc1411515937 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Data |
object |
The business data. |
|
| TableName |
string |
The name of the table. |
table_name |
| FavoriteCount |
integer |
The number of times the table is added to favorites. This parameter is returned only when the Extension parameter is set to true, and it takes effect only for the odps data source type. |
6 |
| Comment |
string |
The description of the table. |
test table |
| ColumnCount |
integer |
The number of columns. |
3 |
| CreateTime |
integer |
The time when the table was created. The value is a UNIX timestamp in milliseconds. |
1589870294000 |
| ProjectId |
integer |
The ID of the workspace. |
232 |
| OwnerId |
string |
The ID of the table owner. |
123 |
| EnvType |
integer |
The environment type. Valid values:
|
1 |
| DatabaseName |
string |
The name of the database. |
abc |
| IsVisible |
integer |
The visibility of the table. Valid values:
|
1 |
| TableGuid |
string |
The unique identifier of the table. |
odps.engine_name.table_name |
| ReadCount |
integer |
The number of times the table is read. This parameter is returned only when the Extension parameter is set to true, and it takes effect only for the odps data source type. |
3 |
| ClusterId |
string |
The ID of the EMR cluster. |
abc |
| IsPartitionTable |
boolean |
Specifies whether the table is a partitioned table. Valid values:
|
true |
| IsView |
boolean |
Specifies whether the table is a view. Valid values:
|
false |
| LifeCycle |
integer |
The lifecycle of the table. Unit: days. Note
If no lifecycle is set for a MaxCompute table, the value 0 is returned, which indicates that the table is permanently valid. |
5 |
| ProjectName |
string |
The name of the workspace. |
test |
| ViewCount |
integer |
The number of times the table is viewed. This parameter is returned only when the Extension parameter is set to true, and it takes effect only for the odps data source type. |
2 |
| LastAccessTime |
integer |
The time when the table was last accessed. The value is a UNIX timestamp in milliseconds. |
1589870294000 |
| DataSize |
integer |
The storage space occupied by the table. Unit: bytes. |
10 |
| LastModifyTime |
integer |
The time when the table was last updated. The value is a UNIX timestamp in milliseconds. |
1589870294000 |
| LastDdlTime |
integer |
The time when the table schema was last changed. The value is a UNIX timestamp in milliseconds. |
1589870294000 |
| PartitionKeys |
string |
The Hive partitions. |
ab |
| Location |
string |
The storage address of the Hive database. |
hdfs:// |
| Caption |
string |
The Chinese name of the table. |
中文名 |
| TenantId |
integer |
The tenant ID. |
12345 |
| Schema |
string |
The schema information of the table. In MaxCompute, schema information is required when the three-tier model is enabled. |
default |
Examples
Success response
JSON format
{
"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": "中文名",
"TenantId": 12345,
"Schema": "default"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.Meta.TableNotExist | The table does not exist. | The table does not exist. |
| 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.UserId.Missing | An internal system error occurred. Try again later. | |
| 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.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.