Updated on 2025-04-21 GMT+08:00

UPDATE

Function

This command is used to update the Hudi table based on the column expression and optional filtering conditions.

Syntax

UPDATE tableIdentifier SET column = EXPRESSION(,column = EXPRESSION) [ WHERE boolExpression]

Parameter Description

Table 1 Parameter descriptions

Parameter

Description

tableIdentifier

Name of the Hudi table to be updated.

column

Target column to be updated.

EXPRESSION

Expression of the source table column to be updated in the target table.

boolExpression

Filtering condition expression.

Example

update h0 set price = price + 20 where id = 1;
update h0 set price = price *2, name = 'a2' where id = 2;

System Response

You can confirm the job status as successful and run a QUERY statement to verify that the data in the table has been updated.