lttb() and asap_smooth(), and can be created directly from your data using the timevector() aggregate function.
timevectors give you:
- Space efficient: compact representation of time-value pairs
- Pipeline operations: chain transformations using the
->operator - Flexible aggregation: create from raw data or combine existing timevectors
- Easy extraction: use
unnest()to convert back to rows
Samples
Create and query a timevector
This example creates a timevector from time-series data and extracts the values:Use timevector with downsampling
Timevectors work seamlessly with downsampling functions:Combine multiple timevectors
Userollup() to combine timevectors from different groups:
Timevector pipelines
Timevectors support pipeline operations using the-> operator. This allows you to chain transformations:
sort(): Sort points by timestampdelta(): Calculate differences between consecutive valueslttb(resolution): Downsample using LTTB algorithm
Available functions
Aggregate functions
timevector(): create a timevector from time-value pairsrollup(): combine multiple timevectors
Accessor functions
unnest(): extract time-value pairs from a timevector