Documentation

query.filterMeasurement() function

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

The query.filterMeasurement() function filters input data by measurement.

Function type: Transformation

import "experimental/query"

query.filterMeasurement(
  measurement: "example-measurement"
)

Parameters

measurement

The name of the measurement to filter by. Must be an exact string match.

Data type: String

Examples

import "experimental/query"

query.fromRange(bucket: "example-bucket", start: -1h)
  |> query.filterMeasurement(
    measurement: "example-measurement"
  )

Function definition

package query

filterMeasurement = (tables=<-, measurement) =>
  tables
    |> filter(fn: (r) => r._measurement == measurement)

Used functions:
filter()


New! 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: