Documentation

highestMax() function

Flux 0.7.0+

The highestMax() function selects the maximum record from each table in the input stream and returns the top n records. The function outputs a single aggregated table containing n records. highestMax() is a selector function.

highestMax(
  n:10,
  column: "_value",
  groupColumns: []
)

Empty tables

highestMax() drops empty tables.

Parameters

n

Number of records to return.

column

Column by which to sort. Default is "_value".

groupColumns

The columns on which to group before performing the aggregation. Default is [].

tables

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

Examples

The following example uses data provided by the sampledata package to show how highestMax() transforms data.

import "sampledata"

sampledata.int()
  |> highestMax(n: 2, groupColumns: ["tag"])

View input and output


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.