On this page
像创建表— PUT ddl/database /:db/table /:existingtable/like /:newtable
Description
像现有的一样创建一个新的 HCatalog 表。
URL
http:// * www.myserver.com * /templeton/v1/ddl/database/ *:db * /table/ *:existingtable * /like/ *:newtable *
Parameters
| Name | Description | Required? | Default |
|---|---|---|---|
| :db | 数据库名称 | Required | None |
| :existingtable | 现有表名 | Required | None |
| :newtable | 新表名 | Required | None |
| group | 创建表时要使用的用户组 | Optional | None |
| permissions | 创建表时使用的权限字符串 | Optional | None |
| external | 允许您指定一个位置,以便 Hive 不使用此表的默认位置。 | Optional | false |
| ifNotExists | 如果为 true,则该表已经存在,则不会收到错误消息。 | Optional | false |
| location | HDFS 路径 | Optional | None |
standard parameters也受支持。
Results
| Name | Description |
|---|---|
| table | 新表名 |
| database | 数据库名称 |
Example
Curl Command
% curl -s -X PUT -HContent-type:application/json -d {} \
'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/like/test_table_2?user.name=ctdean'
JSON Output
{
"table": "test_table_2",
"database": "default"
}
Navigation Links
上一个:DELETE ddl/database/:db/table/:table下一个:GET ddl/database/:db/table/:table/partition
一般:DDL Resources – WebHCat Reference – WebHCat Manual – HCatalog Manual – Hive Wiki 主页 – Hive 项目 site