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.
experimental.first()
is a selector function.
import "experimental"
experimental.first()
Empty tables
experimental.first()
drops empty tables.
Parameters
tables
Input data.
Default is piped-forward data (<-
).
Examples
Return the first non-null value
import "experimental"
data
|> experimental.first()
Input data
_time | _value |
---|---|
2021-01-01T00:00:00Z | 1.2 |
2021-01-01T00:01:00Z | 0.6 |
2021-01-01T00:02:00Z | 2.3 |
2021-01-01T00:03:00Z | 0.9 |
Output data
_time | _value |
---|---|
2021-01-01T00:00:00Z | 1.2 |
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.