Documentation

experimental.first() function

The experimental.first() function is subject to change at any time. By using this function, you accept the risks of experimental functions.

The experimental.first() function returns the first record with a non-null value in the _value column.

Function type: Selector

import "experimental"

experimental.first()

Empty tables

experimental.first() drops empty tables.

Parameters

tables

Input data. Default is pipe-forwarded data.

Examples

Return the first non-null value

import "experimental"

data
  |> experimental.first()
Input data
_time_value
2021-01-01T00:00:00Z1.2
2021-01-01T00:01:00Z0.6
2021-01-01T00:02:00Z2.3
2021-01-01T00:03:00Z0.9
Output data
_time_value
2021-01-01T00:00:00Z1.2

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: