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. Similar to frame(), frame_exact can also take “start” and “end”, and has the same limitations on “start” and “end” that frame does (only used with the following window functions: sum, avg, count, min, max, and stddev)

Return type

frame

Domain

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

Categories

Usage

frame_exact([ timePoint_1, timePoint_2, ... ])

Argument

Type

Optional

Repeatable

Restrictions

timePoint

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