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 " | 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
Previous: PUT ddl/database/:db General: DDL Resources – WebHCat Reference – WebHCat Manual – HCatalog Manual – Hive Wiki Home – Hive Project Site |