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,'陈');