last() function

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()

This documentation is open source. See a typo? Please, open an issue.


Need help getting up and running? Get Support