inceptor、hive遇到的问题
发布网友
发布时间:2023-02-15 15:56
我来回答
共1个回答
热心网友
时间:2023-09-20 15:49
1.创建表
create table if not exists text (sid int ,sname String);
2.插入数据时报错:
insert into text values (1,"zhangsan");
[42000][10797] COMPILE FAILED: Semantic error: [Error 10797] Only allow to single insert into Hyperbase/ES/Transaction Orc, other data destination not allowed
意思是使用insert into 方式插入数据只能是orc事务表,其他类型的源数据是不被允许的
3.网上查找解决方式是这样创建表:
create table if not exists text (sid int ,sname String)
row format delimited fields terminated by ',' stored as ORC;
使用这种方式创建表后还是报同样的错误
4.加个分桶解决问题
SET transaction.type=inceptor;
CREATE TABLE ta (name STRING,age INT)CLUSTERED BY (age)INTO 2 BUCKETS STORED AS ORC
TBLPROPERTIES ("transactional"="true");