inceptor、hive遇到的问题

inceptor、hive遇到的问题

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");

你可能感兴趣的:(inceptor、hive遇到的问题)