【问题标题】:Unable to update Hive Transactional table无法更新 Hive 事务表
【发布时间】:2017-12-24 06:59:18
【问题描述】:

我正在尝试更新 Hive 事务表,但它给出以下错误:

FAILED: SemanticException [Error 10290]: Encountered parse error while 解析重写的合并/更新或删除查询。

下面是我的表格 DDL:

CREATE TABLE bucketed_poc(
Col1 Int,
Col2 Int
)
CLUSTERED BY (Col2) INTO 10 BUCKETS
STORED AS ORC TBLPROPERTIES("transactional"="true","orc.compress"="ZLIB");

以下是我为 ACID 表设置的属性:

set hive.enforce.bucketing = true;
set hive.support.concurrency = true;
set hive.exec.dynamic.partition.mode = nonstrict;
set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.compactor.initiator.on = true;
set hive.compactor.worker.threads = 1;

我可以删除数据,但更新不起作用。我正在运行下面提到的更新查询:

Update bucketed_poc set col2 = 1 where `col1=877639`; 

【问题讨论】:

    标签: hadoop hive


    【解决方案1】:

    在 hive 事务表中,您无法更新分桶列。在您的情况下,分桶是在 col2 列上完成的,因此您无法更新 col2。

    【讨论】:

      猜你喜欢
      • 2020-05-15
      • 2014-09-16
      • 2021-12-28
      • 2019-05-14
      • 1970-01-01
      • 2022-10-03
      • 1970-01-01
      • 2023-03-17
      • 1970-01-01
      相关资源
      最近更新 更多