DELETE
Function
This command deletes records from a Delta table.
Syntax
DELETE from [database_name.]table_name|DELTA.`obs://bucket_name/tbl_path`
[ WHERE boolExpression]
Parameter Description
| Parameter | Description |
|---|---|
| database_name | Name of the database, consisting of letters, numbers, and underscores (_) |
| table_name | Name of the table in the database, consisting of letters, numbers, and underscores (_) |
| bucket_name | OBS bucket name |
| tbl_path | Storage location of the Delta table in the OBS bucket |
| boolExpression | Filter conditions for deleting records |
Required Permissions
- SQL permissions
| Permission Description |
|---|
| DELETE permission on a table |
- Fine-grained permission: dli:table:delete
- Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.
Examples
delete from delta_table0 where column1 = 'value1';
delete from delta_table0 where column1 IN ('value1', 'value2');
delete from delta.`obs://bucket_name0/db0/delta_table0` where column1 = 'value1'; System Response
You can view the result in driver logs or on the client.