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] )
The value for which to search.
Data type: Boolean | Integer | UInteger | Float | String | Time
The set of values in which to search.
Data type: Array of Booleans | Integers | UIntegers | Floats | Strings | Times
Filter on a set of specific fields
fields = ["load1", "load5", "load15"] from(bucket: "example-bucket") |> range(start:start, stop: stop) |> filter(fn: (r) => r._measurement == "system" and contains(value: r._field, set: fields) )
Bug Reports and Feedback
Thank you for being willing to help test InfluxDB v2.0 alpha! Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation. Submit feedback using one of the following methods:
- Post in the InfluxData Community
- In the InfluxDB UI, click Feedback in the left navigation bar.