Samples
This example uses a table with raw data generated as a sine wave, and removes a day from the middle of the data. You can use gap preserving LTTB to downsample the data while keeping the bounds of the missing region.Arguments
The syntax is:| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| ts | TIMESTAMPTZ | - | ✔ | Timestamps for each data point |
| value | DOUBLE PRECISION | - | ✔ | The value at each timestamp |
| resolution | INT | - | ✔ | The approximate number of points to return. Determines the horizontal resolution of the resulting graph. |
| gapsize | INTERVAL | - | Minimum gap size to divide input on |
Returns
| Column | Type | Description |
|---|---|---|
| gp_lttb | Timevector | An object representing a series of values occurring at set intervals from a starting time. It can be unpacked with unnest. For more information, see the documentation on timevectors. |