Deletes one or more pre-downsampling rules from a time series table.
Applicable engines and versions
Applies to all versions of LindormTSDB.
Syntax
DROP PREDOWNSAMPLE time_interval
AGGREGATORS (function_identifier [, function_identifier ...])
ON table_identifier
time_interval ::= interval unitsParameters
| Parameter | Description |
|---|---|
interval | The aggregation interval. Must be a positive integer. |
units | The time unit for the interval. Valid values: s (seconds), m (minutes), h (hours), d (days). |
AGGREGATORS | The aggregation functions to remove. Valid values: count (returns the total number of data points), first (returns the first value), last (returns the last value), min (returns the minimum value), max (returns the maximum value), sum (returns the sum of the values). |
function_identifier | The name of an aggregation function. Specify one or more functions with the same interval in a single statement, or split them across multiple statements. |
table_identifier | The name of the time series table. |
avgis not supported in pre-downsampling. To compute an average, derive it from thesumandcountresults. If data is repeatedly written and overwritten, the derived average may be inaccurate.
Examples
Delete the sum and max pre-downsampling rules with a 1-day interval from the sensor table:
DROP PREDOWNSAMPLE `1d` AGGREGATORS (`sum`, `max`) ON sensor;