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) )
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support or submit feedback, the following resources are available:
- Post in the InfluxData Community.
- Submit documentation issues to the InfluxDB 2.0 documentation repository.
- Submit InfluxDB issues to the InfluxDB repository.
For our InfluxDB Cloud customers, InfluxData Support is also available.