Oma*_*ier 5 sql hive hiveql impala
我在 Hive 表中有一个标志列,我想在一些处理后更新它。我尝试使用下面的查询使用 hive 和 impala,但它不起作用,并且发现它需要是 kudu 表,而我拥有的表是非 kudu 表。有没有办法像下面的查询一样更新它?
UPDATE table_name SET flag_col = 1
where [condition];
Run Code Online (Sandbox Code Playgroud)
用计算值覆盖整个表,所有其他列按原样:
insert overwrite table table_name
select col1, col2, ..., coln,
case when [condition] then 1 else flag_col end as flag_col,
colO,
colP...
from table_name ;
Run Code Online (Sandbox Code Playgroud)
阅读文档以了解有关分区表等的更多详细信息:https://docs.cloudera.com/documentation/enterprise/5-8-x/topics/impala_insert.html