尝试执行非事务性更新 table 时出现 Hive 错误
Hive error with attempt to do update table that is not transactional
我正在尝试使用以下命令更新配置单元上的临时 table:
alter table para1 add columns(log_flag int);
update para1 set log_flag = (
case
when name like '%LANDING__TIME' then 1
when name like '%LOGIN_START_TIME' then 2
when name like '%LOGIN_TIME' then 3
else 4
end
);
以下是我收到的错误:
ERROR: Execute error: org.apache.hive.service.cli.HiveSQLException:
Error while compiling statement: FAILED: SemanticException
[Error 10297]: Attempt to do update or delete on table df.para1 that is not transactional
这阻止我用新的条件变量 log_flag 更新 table,我真的不确定是什么原因。
感谢您的帮助!
对非事务使用 INSERT OVERWRITE table:
INSERT OVERWRITE table para1
select
col1, ... coln, --list all other columns (columns positions should match)
case
when name like '%LANDING__TIME' then 1
when name like '%LOGIN_START_TIME' then 2
when name like '%LOGIN_TIME' then 3
else 4
end as log_flag
from para1;
我正在尝试使用以下命令更新配置单元上的临时 table:
alter table para1 add columns(log_flag int);
update para1 set log_flag = (
case
when name like '%LANDING__TIME' then 1
when name like '%LOGIN_START_TIME' then 2
when name like '%LOGIN_TIME' then 3
else 4
end
);
以下是我收到的错误:
ERROR: Execute error: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10297]: Attempt to do update or delete on table df.para1 that is not transactional
这阻止我用新的条件变量 log_flag 更新 table,我真的不确定是什么原因。
感谢您的帮助!
对非事务使用 INSERT OVERWRITE table:
INSERT OVERWRITE table para1
select
col1, ... coln, --list all other columns (columns positions should match)
case
when name like '%LANDING__TIME' then 1
when name like '%LOGIN_START_TIME' then 2
when name like '%LOGIN_TIME' then 3
else 4
end as log_flag
from para1;