Queries the details about multiple metadata tables in Data Lake Formation (DLF) at a time.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request parameters.
Request syntax
POST /api/metastore/catalogs/databases/tables/batchget
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
Object | Body | No |
The HTTP request body, in the JSON format. |
||
CatalogId | String | Body | No | 1344371 |
The catalog ID of the metadatabase. Default value: the user ID of your Alibaba Cloud account. |
DatabaseName | String | Body | No | database_test |
The name of the metadatabase. |
TableNames | ListString | Body | No |
The names of the metadata tables. |
|
RegionId | String | Host | No | cn-hangzhou |
The ID of the region where DLF is activated. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | OK |
The description of the status code. |
Message | String | . |
The error message that is returned. |
RequestId | String | B7F4B621-E41E-4C84-B97F-42B5380A32BB |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful. |
TableErrors | Array of TableError |
The metadata table errors that are returned. |
|
Tables | Array of Table |
The list of metadata tables that are returned. |
Error codes
NoSuchObject: The specified metadata table does not exist.
InternalError: An internal error has occurred. Troubleshoot the error based on the error message that is returned.
Examples
Sample requests
POST /api/metastore/catalogs/databases/tables/batchget HTTP/1.1
{
"DatabaseName":"database_test",
"CatalogId":"1344371",
"TableNames":["test_table_20200715162543389"]
}
Sample success responses
JSON
format
{
"Success": true,
"Code": "OK",
"Message": "",
"HttpStatusCode": 200,
"RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
"Tables": [{
"Cascade": false,
"TableName": "test_table_20200715162543389",
"DatabaseName": "database_test",
"TableType": "MANAGED_TABLE",
"Description": "",
"Retention": 365,
"Sd": {
"Cols": [
{
"Comment": "user_name",
"Name": "name",
"Type": "string",
"Parameters": {}
}
],
"Compressed": false,
"InputFormat": "input",
"Location": "",
"NumBuckets": 5,
"OutputFormat": "output",
"Parameters": {},
"SerDeInfo": {
"Name": "",
"SerializationLib": "",
"Parameters": {}
},
"SkewedInfo": {
"SkewedColNames": [],
"SkewedColValues": [],
"SkewedColValueLocationMaps": {}
},
"BucketCols": [
"col1"
],
"SortCols": [
{
"Order": 0,
"Col": "col"
}
],
"StoredAsSubDirectories": false
},
"PartitionKeys": [
{
"Comment": "comment_day",
"Name": "day",
"Type": "int",
"Parameters": {}
}
],
"Parameters": {},
"ViewOriginalText": "",
"ViewExpandedText": "",
"CreatedBy": "",
"Privileges": {},
"RewriteEnabled": true,
"Temporary": false,
"OwnerType": "",
"CreateTime": 0,
"UpdateTime": 0,
"LastAccessTime": 0,
"LastAnalyzedTime": 0
}]
}
Error codes
For a list of error codes, visit the API Error Center.