Apache Hive : WebHCat Reference DeletePartition

Last updated: December 12, 2024

Apache Hive : WebHCat Reference DeletePartition

Description

Delete (drop) 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
ifExistsHive returns an error if the partition specified does not exist, unless ifExists is set to true.Optionalfalse
groupThe user group to useOptionalNone
permissionsThe permissions string to use. The format is “rwxrw-r-x”.OptionalNone

The standard parameters are also supported.

Results

NameDescription
partitionThe partition name
tableThe table name
databaseThe database name

Example

Curl Command

% curl -s -X DELETE \
       '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: PUT ddl/database/:db/table/:table/partition/:partition Next: GET ddl/database/:db/table/:table/column