Updating Apache Iceberg Tables
The UPDATE command updates rows in a table.
UPDATE <table_path>.<table_name> [AS alias]
SET <column1_name> = <value1> [, <column2_name> = <value2> ... ]
[ WHERE where_conditions ]
Parameters
<table_path>
String
The path in which the table is located.
<table_name>
String
The name of the table with data that you want to update.
SET <column1_name> = <value1> [, <column2_name> = <value2> ... ]
String
Sets the value of one or more columns. The value can be any expression or sub-query that returns a single value.
WHERE where_conditions
String
(Optional) The filter for specifying which rows of the table to update.
note:
Join conditions are not supported in WHERE clauses. If you need to use a join condition, use a MERGE statement.
update t2 set id = id + t1.id from t1 where t1.name = t2.name;
merge into t2 using t1 on (t1.name = t2.name) when matched then update set id = t2.id + t1.id;
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.