Queries the statistics on the fields in multiple metadata table partitions at a time. This operation is similar to the GetPartitionColumnStatistics operation. The difference lies in that this operation supports HTTP POST requests. This way, longer request bodies can be used.
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/partitions/columnstatistics/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. |
TableName | String | Body | No | test_table_20201223 |
The name of the metadata table. |
PartitionNames | ListString | Body | No |
The names of the partitions in the metadata table. |
|
ColumnNames | ListString | Body | No |
The names of the fields in the metadata table. |
|
RegionId | String | Host | No | cn-hangzhou |
The ID of the region where Data Lake Formation (DLF) is activated. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | OK |
The description of the status code. |
PartitionStatisticsMap | Map |
The statistics on the partitions. |
|
Array of ColumnStatisticsObj |
The statistics on each partition. |
||
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. |
Examples
Sample requests
POST /api/metastore/catalogs/databases/tables/partitions/columnstatistics/batchget HTTP/1.1
{
"TableName":"test_table_20201223",
"DatabaseName":"database_test",
"CatalogId":"1344371",
"ColumnNames":[
"col1"
],
"PartitionNames":[
"ds=20201201"
]
}
Sample success responses
JSON
format
{
"Success": true,
"Code": "OK",
"Message": "",
"HttpStatusCode": 200,
"RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
"PartitionStatisticsMap": {
"ds=20201201": [
{
"ColumnName": "col1",
"ColumnType": "boolean",
"ColumnStatisticsData": {
"StatisticsType": "BOOLEAN_STATS",
"StatisticsData": "{\"numNulls\":0,\"numTrues\":1,\"numFalses\":5}"
}
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.