Flux Query package

The Query package is experimental and subject to change at any time. By using this package, you accept the risks of experimental functions.

Flux Query functions provide functions meant to simplify common InfluxDB queries. Import the experimental/query package:

  1. import "experimental/query"

inBucket()

The primary function in this package is query.inBucket(), which uses all other functions in this package.

  1. import "experimental/query"
  2. query.inBucket(
  3. bucket: "example-bucket",
  4. start: -1h,
  5. stop: now(),
  6. measurement: "example-measurement",
  7. fields: ["exampleField1", "exampleField2"],
  8. predicate: (r) => r.tagA == "foo" and r.tagB != "bar"
  9. )

package