像创建表— 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

NameDescriptionRequired?Default
:db数据库名称RequiredNone
:existingtable现有表名RequiredNone
:newtable新表名RequiredNone
group创建表时要使用的用户组OptionalNone
permissions创建表时使用的权限字符串OptionalNone
external允许您指定一个位置,以便 Hive 不使用此表的默认位置。Optionalfalse
ifNotExists如果为 true,则该表已经存在,则不会收到错误消息。Optionalfalse
locationHDFS 路径OptionalNone

standard parameters也受支持。

Results

NameDescription
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 ResourcesWebHCat ReferenceWebHCat ManualHCatalog ManualHive Wiki 主页Hive 项目 site