Apache Hive : WebHCat Reference PutPartition

Last updated: December 12, 2024

Apache Hive : WebHCat Reference PutPartition

Description

Create a partition in an HCatalog table.

URL

http://www.myserver.com/templeton/v1/ddl/database/:db/table/:table/partition/:partition

Parameters

NameDescriptionRequired?Default
:dbThe database nameRequiredNone
:tableThe table nameRequiredNone
:partitionThe partition name, col_name=‘value’ list. Be careful to properly encode the quote for http, for example, country=%27algeria%27.RequiredNone
groupThe user group to useOptionalNone
permissionsThe permissions string to useOptionalNone
locationThe location for partition creationRequiredNone
ifNotExistsIf true, return an error if the partition already exists.OptionalFalse

The standard parameters are also supported.

Results

NameDescription
partitionThe partition name
tableThe table name
databaseThe database name

Example

Curl Command

% curl -s -X PUT -HContent-type:application/json -d '{"location": "loc_a"}' \
       'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/partition/country=%27algeria%27?user.name=ctdean'

JSON Output

{
 "partition": "country='algeria'",
 "table": "test_table",
 "database": "default"
}

Navigation Links Previous: GET ddl/database/:db/table/:table/partition/:partition Next: DELETE ddl/database/:db/table/:table/partition/:partition