【发布时间】:2016-04-14 13:23:23
【问题描述】:
在 hive 0.14 中,我有一个支持 ACID 事务的表。
create table HiveTest
(EmployeeID Int,FirstName String,Designation String,
Salary Int,Department String)
clustered by (department) into 3 buckets
stored as orc TBLPROPERTIES ('transactional'='true');
好的。我可以在这个表中插入数据:
from stagingtbl
insert into table HiveTest
select employeeid,firstname,designation,salary,department;
但如果我不使用此表的存储桶:
create table HiveTest
(EmployeeID Int,FirstName String,Designation String,
Salary Int,Department String)
stored as orc TBLPROPERTIES ('transactional'='true');
插入数据时会出错:表未分桶。
所以我们必须在 ACID 事务支持中创建一个带有桶的表来插入数据?
我们还有其他方法可以在 ACID 支持的表中插入数据吗?
【问题讨论】: