Documentation

aggregate.window() function

aggregate.window() is a user-contributed function maintained by the package author and can be updated or removed at any time.

aggregate.window() aggregates columns and create tables by organizing incoming points into windows.

Each table will have two additional columns: start and stop. These are the start and stop times for each interval. It is not possible to use start or stop as destination column names with this function. The start and stop columns are not added to the group key.

Function type signature
(
    <-tables: stream[B],
    columns: A,
    every: duration,
    ?period: duration,
    ?time: string,
) => stream[C] where A: Record, B: Record, C: Record
For more information, see Function type signatures.

Parameters

tables

Input data. Default is piped-forward data (<-).

columns

(Required) Columns to aggregate and which aggregate method to use. See aggregate.table() for details.

every

(Required) Duration between the start of each interval.

time

Column name for the time input. Defaults to _time or time (whichever is earlier in the list of columns).

period

Length of the interval. Defaults to the every duration.


Was this page helpful?

Thank you for your feedback!


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.