一、建内部表
create table emp (
id string default null comment ‘’
,name string default null comment ‘’
,id_no string default null comment ‘’
)clustered by (id) into 31 buckets
stored as orc
tblpropertirs (“transactional”=“true”);
二、建外部表
create external table emp_ext (
id string default null comment ‘’
,name string default null comment ‘’
,id_no string default null comment ‘’
)
row format serde ‘transwarp.zjrcu.xkl.hive.csvserde’
location ‘/tmp/default/emp_ext’;
三、建分区表
create external table emp_ext (
id string default null comment ‘’
,name string default null comment ‘’
,id_no string default null comment ‘’
,etl_date ‘’
)
partitioned by (etl_date string comment ‘’)
clustered by (id) into 31 buckets
stored as orc
tblpropertirs (“transactional”=“true”);
【TDH】inceptor建内部表、外部表、分区表
最新推荐文章于 2023-12-16 17:25:24 发布