v1.fieldKeys() function

v1.fieldKeys() was deprecated in Flux v0.88.0 in favor of schema.fieldKeys().

The v1.fieldKeys() function returns field keys in a bucket. The return value is always a single table with a single column, _value.

import "influxdata/influxdb/v1"

  bucket: "example-bucket",
  predicate: (r) => true,
  start: -30d



The bucket to list field keys from.

Data type: String


The predicate function that filters field keys. Defaults to (r) => true.

Data type: Function


The oldest time to include in results. Defaults to -30d.

Relative start times are defined using negative durations. Negative durations are relative to now. Absolute start times are defined using time values.

Data type: Duration


import "influxdata/influxdb/v1"

v1.fieldKeys(bucket: "my-bucket")

Function definition

package v1

fieldKeys = (bucket, predicate=(r) => true, start=-30d) =>
  tagValues(bucket: bucket, tag: "_field", predicate: predicate, start: start)

Used functions: v1.tagValues

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: