2.6 Delete Table Records (Rows)
Impulse data structure is optimized for efficient query execution. The index structure within Impulse makes it hard to delete a specific record or a group of records. Impulse provides a mechanism to delete table records using “Delete” statement as described below.
It is important to note that the delete operation is very expensive — it reindexes the entire datasource/table and, therefore, it is likely to take time and resources.
NOTE: Do not ingest any data to the same table from where the records are being deleted, until the delete operation is completed. Ingesting data while delete operation is still on will cause the data loss (of the new data being ingested).
To delete a row or set of rows matching a criteria, write the following query in the SQL statement field and click run (as shown in Figure 2.6a below).
DELETE FROM "DW_ALIAS.TABLENAME" WHERE RecordDate BETWEEN '2000-01-01' AND '2021-12-31'
The where clause supports the following operators:
The following conditional operators are supported:
|!=||not equal to|
|>=||greater than or equal to|
|<=||less than or equal to|