更新时间:2024-12-25 GMT+08:00
分享

DELETE

命令功能

DELETE命令从Hudi表中删除记录。

命令格式

DELETE from tableIdentifier [ WHERE boolExpression]

参数描述

表1 DELETE参数

参数

描述

tableIdentifier

在其中执行删除操作的Hudi表的名称。

boolExpression

删除项的过滤条件

示例

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

系统响应

可以确认任务状态成功,运行QUERY语句查看表中对应数据已被删除。

相关文档