highestCurrent() function
The highestCurrent()
function selects the last record of each table in the input stream and returns the top n
records.
The function outputs a single aggregated table containing n
records.
highestCurrent()
is a selector function.
highestCurrent(
n:10,
column: "_value",
groupColumns: [],
)
Empty tables
highestCurrent()
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 highestCurrent()
transforms data.
import "sampledata"
sampledata.int()
|> highestCurrent(n: 2, groupColumns: ["tag"])
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.