You can call this operation to obtain a list of partition names of data tables in a data lake. This method is usually used for multi-level partitioning.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dlf:ListPartitionNames | list | *All Resources * |
| none |
Request syntax
POST /api/metastore/catalogs/databases/tables/partitions/names HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Body | object | No | The HTTP request body. | |
CatalogId | string | No | The catalog ID. | 1344371 |
DatabaseName | string | No | The database name. | database_test |
NextPageToken | string | No | The pagination token. The token is obtained in the returned results. If no pagination token is returned, set this parameter to an empty string. | 2cb472ec1bf84f8d92f9c4baa0d21c19aa |
PageSize | integer | No | The number of entries per page. Maximum value: 1000. | 10 |
PartialPartValues | ListString | No | The values of the partition key columns. You can pass in only the values of specific partition key columns to query the names of all lower-level partitions. | |
TableName | string | No | The name of the data table. | test_table_20200715162543389 |
Response parameters
Code error code description:
- NoSuchObject: The specified database or table does not exist.
- InternalError: Other types of errors. For more information, see Message tips.
Examples
Sample success responses
JSON
format
{
"Code": "OK",
"Message": ".",
"NextPageToken": "2cb472ec1bf84f8d92f9c4baa0d21c19aa",
"PartitionNames": [
"ds=20201124/hour=10"
],
"RequestId": "B7F4B621-E41E-4C84-B97F-42B5380A32BB",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|