Apache Hive : WebHCat Reference PutDB

Create Database — PUT ddl/database/:db

Description

Create a database.

URL

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

Parameters

Name Description Required? Default
:db The database name Required None
group The user group to use Optional None
permissions The permissions string to use Optional None
location The database location Optional None
comment A comment for the database, like a description Optional None
properties The database properties Optional None

The standard parameters are also supported.

Results

Name Description
database The database name

Example

Curl Command

% curl -s -X PUT -HContent-type:application/json \
       -d '{ "comment":"Hello there",
             "location":"hdfs://localhost:9000/user/hive/my\_warehouse",
             "properties":{"a":"b"}}' \
       'http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=rachel'

JSON Output

{
 "database":"newdb"
}

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

General: DDL ResourcesWebHCat ReferenceWebHCat ManualHCatalog ManualHive Wiki HomeHive Project Site