Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Describe Partition — GET ddl/database/:db/table/:table/partition/:partition

Table of Contents

Description

Describe a single partition in an HCatalog table.

URL

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

Parameters

Name

Description

Required?

Default

:db

The database name

Required

None

:table

The table name

Required

None

:partition

The partition name, col_name='value' list. Be careful to properly encode the quote for http, for example, country=%27algeria%27.

Required

None

The standard parameters are also supported.

Results

Name

Description

database

The database name

table

The table name

partition

The partition name

partitioned

True if the table is partitioned

location

Location of table

outputFormat

Output format

columns

List of column names, types, and comments

owner

The owner's user name

partitionColumns

List of the partition columns

inputFormat

Input format

Example

Curl Command

No Format
% curl -s \
   'http://localhost:50111/templeton/v1/ddl/database/default/table/mytest/partition/country=%27US%27?user.name=ctdean'

JSON Output

No Format
{
  "partitioned": true,
  "location": "hdfs://ip-10-77-6-151.ec2.internal:8020/apps/hive/warehouse/mytest/loc1",
  "outputFormat": "org.apache.hadoop.hive.ql.io.RCFileOutputFormat",
  "columns": [
    {
      "name": "i",
      "type": "int"
    },
    {
      "name": "j",
      "type": "bigint"
    },
    {
      "name": "ip",
      "comment": "IP Address of the User",
      "type": "string"
    }
  ],
  "owner": "rachel",
  "partitionColumns": [
    {
      "name": "country",
      "type": "string"
    }
  ],
  "inputFormat": "org.apache.hadoop.hive.ql.io.RCFileInputFormat",
  "database": "default",
  "table": "mytest",
  "partition": "country='US'"
}


Panel
titleColorindigo
titleBGColorsilver
titleNavigation Links

Previous: GET ddl/database/:db/table/:table/partition
Next: PUT ddl/database/:db/table/:table/partition/:partition

General: DDL ResourcesWebHCat ReferenceWebHCat ManualHCatalog ManualHive Wiki HomeHive Project Site
Old version of this document (HCatalog 0.5.0): GET ddl/database/:db/table/:table/partition/:partition