getTablePartitions
- Print
- PDF
getTablePartitions
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
Searches for the partition key/value of a specific table with the database/table name of the user's catalog.
Requests
Request URL
GET {DATA_CATALOG API_URL}/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}/partitions
Request parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
catalogId | Yes | String | Unique catalog ID (ref: getCatalogs) | |
databaseName | Yes | String | Database name | |
tableName | Yes | String | Table name | |
pageNo | No | int | Default of the page number: 1 | |
pageSize | No | int | Maximum: 200 | Default of the result list size: 20 |
Request header
Request examples
curl -X GET "https://datacatalog.apigw.ntruss.com/api/v1/catalogs/{catalog-id}/databases/{database-name}/tables/{table-name}/partitions?pageNo=1&pageSize=20" \
-H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
-H "x-ncp-iam-access-key: {x-ncp-iam-access-key}" \
-H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
Responses
Response bodies
- partitionList: list of partitions for the user’s table
Item | Type | Description |
---|---|---|
partitionKey.name | String | Name of the partition key |
partitionValue.valueList[] | String | Name of the partition value |
Response examples
HTTP
HTTP Status | Description |
---|---|
200 | OK |
JSON
{
"requestId": "d8a6ad30-2d95-4c4d-872a-523cde8356b6",
"totalCount": 3,
"partitionList": [
{
"partitionKey": {
"name": "partition_0"
},
"partitionValue": {
"valueList": [
"test01",
"test01"
]
}
},
{
"partitionKey": {
"name": "partition_1"
},
"partitionValue": {
"valueList": [
"sales",
"sales"
]
}
},
{
"partitionKey": {
"name": "partition_2"
},
"partitionValue": {
"valueList": [
"2021",
"2022"
]
}
}
]
}
Was this article helpful?