WebHCat Reference: GET partitions
WebHCat Reference: GET partitions
설명 (Description)
HCatalog 테이블의 모든 파티션 목록을 반환해요.
출처: 문서
본문
URL
http://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition
파라미터 (Parameters)
| Name | Description | Required? | Default |
|---|---|---|---|
| :db | The database name | Required | None |
| :table | The table name | Required | None |
표준 파라미터도 지원돼요.
결과 (Results)
| Name | Description |
|---|---|
| partitions | A list of partition values and of partition names |
| database | The database name |
| table | The table name |
예제 (Example)
Curl 명령 (Curl Command)
% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table/partition?user.name=ctdean'
JSON 출력 (JSON Output)
{
"partitions": [
{
"values": [
{
"columnName": "dt",
"columnValue": "20120101"
},
{
"columnName": "country",
"columnValue": "US"
}
],
"name": "dt='20120101',country='US'"
}
],
"database": "default",
"table": "my_table"
}
더 알아보기 (Learn more)
GET partitions 엔드포인트는 테이블의 파티션 값을 조회할 때 사용해요. 반환되는 partitions 배열에는 각 파티션의 컬럼·값 목록과 파티션 이름이 함께 포함됩니다.