This article explains how to delete your imported data by using the
td table:partial_delete command.
|Arm Treasure Data has released Public Beta availability of a more general DELETE query statement in Presto. We generally recommend using the Presto DELETE statement instead of partial-delete. The Presto DELETE is more flexible.|
- Basic knowledge of Treasure Data, including the toolbelt.
td table:partial_delete command lets you delete your imported data within a specific table by specifying the time range.
|Generally, data that is imported at least 1 hour before or earlier than when you want to delete it is stored in columnar compressed format and partitioned by hour in 'Archive' storage. Alternatively, data imported 1 hour before or less, is stored in a 'raw' msgpack compressed format and is not partitioned by hour in 'Realtime' storage.
Currently the 'partial_delete' procedure can only delete data from 'Archive' storage and won't alter 'Realtime' storage data.
Because the stored data is partitioned by hour, the arguments for
--to must be an integer multiple of 3600 (1 hour). Refer to
td help table:partial_delete for more information.
The data deletion is executed as a
job. This means that you can confirm its status by issuing the
td jobs command (see Job Management). The
-w option allows you to wait until the job is finished.