forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
4.9 KiB
4.9 KiB
DELETE SEGMENT by DATE
Function
This command is used to delete segments by loading date. Segments created before a specific date will be deleted.
Syntax
DELETE FROM TABLE db_name.table_name WHERE SEGMENT.STARTTIME BEFORE date_value;
Parameter Description
Parameter |
Description |
---|---|
db_name |
Database name. If this parameter is not specified, the current database is used. |
table_name |
Name of a table in the specified database |
date_value |
Valid date when segments are started to be loaded. Segments before the date will be deleted. |
Precautions
Segments cannot be deleted from the stream table.
Example
DELETE FROM TABLE db_name.table_name WHERE SEGMENT.STARTTIME BEFORE '2017-07-01 12:07:20';
STARTTIME indicates the loading start time of different loads.
System Response
Success or failure will be recorded in CarbonData logs.
Parent topic: DML