Configuration parameters

The DELETE function is used to delete a set of GTS from a Warp 10 platform. A delete endpoint must be set on the Warp 10 configuration.

Delete expects 5 parameters on top of the stack: the write token of the Warp 10 application, a string corresponding to a gts selector, a start and a end timestamp and finally the number of GTS expected to be deleted.

If you specify start and end, Warp 10 will delete datapoints. If there is not any datapoints left, the GTS will remain in the directory (FIND will return it). To delete all datapoints and the directory entry, use NULL for end_timestamp and start_timestamp. FIND won't find anything after a delete all.

For safety reasons DELETE will first perform a dryrun call to the /delete endpoint to retrieve the number of GTS which would be deleted by the call. If this number is above the expected number provided by the user the actual delete will not be performed and instead an error will be raised.

Delete will push as a result the number of GTS really deleted.

Since 2.7.3, when setting NULL as the number of GTSs to delete, the DELETE function runs in dry mode. This means no GTS is deleted and the function returns the GTSs list that would be considered by the DELETE.

On a standalone version, deleting data will not free disk space until the next compaction. If you want to immediatly free disk space, contact us to get the leveldb plugin.

DELETE is available since version 1.0.5.



// delete datapoints between 1479372838011043 and NOW, expecting one GTS to be selected 'TOKEN_WRITE' 'gts.selector{}' 1479372838011043 NOW 1 DELETE // delete the datapoint at 1479372838011078 for all gts ending with "counter" 'TOKEN_WRITE' '~.*counter{}' 1479372838011078 1479372838011078 MAXLONG DELETE // delete all the gts in the scope of the write token // (delete all datapoints AND the directory entries) 'TOKEN_WRITE' '~.*{}' NULL NULL MAXLONG DELETE