WebHCat Reference PutColumn
Skip to end of metadata
Go to start of metadata

Create Column — PUT ddl/database/:db/table/:table/column/:column

Description

Create a column in an HCatalog table.

URL

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

Parameters

Name

Description

Required?

Default

:db

The database name

Required

None

:table

The table name

Required

None

:column

The column name

Required

None

group

The user group to use

Optional

None

permissions

The permissions string to use

Optional

None

type

The type of column to add, like "string" or "int"

Required

None

comment

The column comment, like a description

Optional

None

The standard parameters are also supported.

Results

Name

Description

column

The column name

table

The table name

database

The database name

Example

Curl Command

% curl -s -X PUT -HContent-type:application/json \
       -d '{"type": "string", "comment": "The brand name"}' \
       'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/column/brand?user.name=ctdean'

JSON Output

{
 "column": "brand",
 "table": "test_table",
 "database": "default"
 }
}


Labels
  • No labels