bin_end_time

bin_end_time() -> timestamp

Returns the end time of the current bin (exclusive).

Typically used with time binning verbs timechart or align. When used with statsby returns the query window end time.

Domain

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

Categories

Examples

timechart 10m, last_to_bin_end:min(bin_end_time() - timestamp), group_by(key)

Create a column named "last_to_bin_end" that contains the difference between the last data point in the bin and the bin's end time.

statsby most_recent:min(bin_end_time() - timestamp), group_by(key)

Return a dataset with two columns "most_recent", and "key" where "most_recent" contains the minimum gap between a row's timestamp and the end of the query window grouped on the "key" column.