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

DELETE

Function

This command is used to delete records from a Hudi table.

Syntax

DELETE from tableIdentifier [ WHERE boolExpression]

Parameter Description

Table 1 Parameter descriptions

Parameter

Description

tableIdentifier

Name of the Hudi table to delete records.

boolExpression

Filtering conditions for deleting records.

Example

  • Example 1:
    delete from h0 where column1 = 'country';
  • Example 2:
    delete from h0 where column1 IN ('country1', 'country2');
  • Example 3:
    delete from h0 where column1 IN (select column11 from sourceTable2);
  • Example 4:
    delete from h0 where column1 IN (select column11 from sourceTable2 where column1 = 'xxx');
  • Example 5:
    delete from h0;

System Response

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