Update and delete data features

From Hive, you can update and delete data in an Iceberg table. From Impala, updates and deletes in an Iceberg table are not supported.

After updating or deleting data in an Iceberg table, you cannot read data in that table from Impala.

Inserting, deleting, or updating table data generates a snapshot. A new snapshot corresponds to a new manifest list. Manifest lists are named snap-*.avro.

Hive syntax

UPDATE tablename SET column = value [, column = value ...] [WHERE expression]
DELETE FROM tablename [WHERE expression]

Hive example

create external table tbl_ice(a int, b string, c int) stored by iceberg stored as orc tblproperties ('format-version'='2');

insert into tbl_ice values (1, 'one', 50), (2, 'two', 51), (3, 'three', 52), (4, 'four', 53), (5, 'five', 54), (111, 'one', 55), (333, 'two', 56);

update tbl_ice set b='Changed' where b in (select b from tbl_ice where a < 4);

delete from tbl_ice where a <= 2,1;