Versions Compared

Key

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

Delete Database — DELETE ddl/database/:db

Table of Contents

Description

Delete a database.

URL

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

Parameters

Name

Description

Required?

Default

:db

The database name

Required

None

ifExists

Hive returns an error if the database specified does not exist, unless ifExists is set to true.

Optional

false

option

Parameter set to either "restrict" or "cascade". Restrict will remove the schema if all the tables are empty. Cascade removes everything including data and definitions.

Optional

None

group

The user group to use

Optional

None

permissions

The permissions string to use. The format is "rwxrw-r-x".

Optional

None

The standard parameters are also supported.

Results

Name

Description

database

The database name

Example

Curl Command

No Format
% curl -s -X DELETE "http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=ctdean"

JSON Output

No Format
{
 "database":"newdb"
}

JSON Output (error)

No Format
{
  "errorDetail": "
    NoSuchObjectException(message:There is no database named my_db)
        at org.apache.hadoop.hive.metastor...
    ",
  "error": "There is no database named newdb",
  "errorCode": 404,
  "database": "newdb"
}


Panel
titleColorindigo
titleBGColorsilver
titleNavigation Links

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

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