last() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.24 is the most recent stable version of Flux.

The last() function selects the last non-null record from an input table.

Function type: Selector
Output data type: Object

last()

Examples

from(bucket:"telegraf/autogen")
  |> range(start:-1h)
  |> filter(fn: (r) =>
    r._measurement == "cpu" and
    r._field == "usage_system"
  )
  |> last()

LAST()