On this page
删除数据库-删除 ddl/database /:db
Description
删除数据库。
URL
http:// * www.myserver.com * /templeton/v1/ddl/database/ *:db *
Parameters
| Name | Description | Required? | Default |
|---|---|---|---|
| :db | 数据库名称 | Required | None |
| ifExists | 如果指定的数据库不存在,除非将 ifExists 设置为 true,否则 Hive 将返回错误。 | Optional | false |
| option | 参数设置为“限制”或“级联”。如果所有表都为空,Restrict 将删除架构。 Cascade 删除所有内容,包括数据和定义。 | Optional | None |
| group | 要使用的用户组 | Optional | None |
| permissions | 要使用的权限字符串。格式为“ rwxrw-r-x”。 |
Optional | None |
standard parameters也受支持。
Results
| Name | Description |
|---|---|
| database | 数据库名称 |
Example
Curl Command
% curl -s -X DELETE "http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=ctdean"
JSON Output
{
"database":"newdb"
}
JSON 输出(错误)
{
"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"
}
Navigation Links
上一个:PUT ddl/database/:db下一个:GET ddl/database/:db/table
一般:DDL Resources – WebHCat Reference – WebHCat Manual – HCatalog Manual – Hive Wiki 主页 – Hive 项目 site