Documentation

v1.measurementFieldKeys() function

The v1.measurementFieldKeys() function returns a list of fields in a measurement. The return value is always a single table with a single column, _value.

import "influxdata/influxdb/v1"

v1.measurementFieldKeys(
  bucket: "example-bucket",
  measurement: "example-measurement",
  start: -30d
)

Parameters

bucket

The bucket to list field keys from.

Data type: String

measurement

The measurement to list field keys from.

Data type: String

start

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 timestamps.

Data type: Duration

Examples

import "influxdata/influxdb/v1"

v1.measurementFieldKeys(
  bucket: "telegraf",
  measurement: "cpu",
)

Function definition

package v1

measurementFieldKeys = (bucket, measurement, start=-30d) =>
  fieldKeys(bucket: bucket, predicate: (r) => r._measurement == measurement, start: start)

Used functions: v1.fieldKeys


New! Cloud or OSS?