hive 创建orc表

orc表
创建具备ACID及Transactions的表
这里的表需要具备下面几个条件: 
1. 必须以 ORC 格式存储 
2. 必须分 bucket,且不能 sort 
3. 必须显式声明transations
--partitioned by (createtime string)
 
create table if not exists user_orc(
id int,
name string,
createdate string,
updatedate date
)
clustered by (id) into 4 buckets
row format delimited fields terminated by ','
stored as orc
tblproperties ('transactional'='true');
 

insert into test_orc values (1,'a');

select * from test_orc;

insert into test_orc values (1,'陈');

 
 

posted on 2017-09-22 16:07  cxhfuujust  阅读(2871)  评论(0编辑  收藏  举报

导航