HCatalog
 

POST ddl/database/:db/table/:table

Description

Rename an HCatalog table.

URL

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

Parameters

NameDescriptionRequired?Default
:db The database name Required None
:table The existing (old) table name Required None
rename The new table name Required None
group The user group to use Optional None
permissions The permissions string to use. The format is "rwxrw-r-x". Optional None

Results

NameDescription
table The new table name
database The database name

Example

Curl Command

% curl -s -d user.name=ctdean \
       -d rename=test_table_2 \
       'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table'

JSON Output

{
 "table": "test_table_2",
 "database": "default"
}

JSON Output (error)

{
  "error": "Table test_table does not exist",
  "errorCode": 404,
  "database": "default",
  "table": "test_table_2"
}