contains() function tests whether a value is a member of a set.
If the value is a member of the set, the function returns
If the value is not a member of the set, the functions returns
contains( value: 1, set: [1,2,3] )
Value to search for.
Set of values to search in.
Filter on a set of specific fields
import "influxdata/influxdb/sample" fields = ["temperature", "humidity"] sample.data(set: "airSensor") |> range(start: -30m) |> filter(fn: (r) => contains(value: r._field, set: fields))
View example input and output
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, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.