frame_exact#

Description#

Specify the exact relative time frame for a window context.

This is the exact version of frame(), where the window frame start and end times are exactly “Valid From” minus “back” and “Valid To” plus “ahead”. Evaluation of exact window frames can be slow when the data volume is large.

Return type#

frame

Domain#

This is a scalar function (calculates a single output value for a single input row.)

Categories#

Usage#

frame_exact([ backOrAhead_1, backOrAhead_2, ... ])

Argument

Type

Optional

Repeatable

Restrictions

backOrAhead

expression

yes

yes

none

Examples#

make_col avg:window(avg(load), group_by(host), order_by(time), frame_exact(back:10m))

Compute the moving average of system load within the past 10 minutes of each event