schema.measurementFieldKeys() function returns a list of fields in a measurement.
The return value is always a single table with a single column,
import "influxdata/influxdb/schema" schema.measurementFieldKeys( bucket: "example-bucket", measurement: "example-measurement", start: -30d )
Bucket to retrieve field keys from.
Measurement to list field keys from.
Oldest time to include in results.
Relative start times are defined using negative durations. Negative durations are relative to now. Absolute start times are defined using time values.
import "influxdata/influxdb/schema" schema.measurementFieldKeys( bucket: "telegraf", measurement: "cpu", )
package schema measurementFieldKeys = (bucket, measurement, start=-30d) => fieldKeys(bucket: bucket, predicate: (r) => r._measurement == measurement, start: start)
Used functions: schema.fieldKeys
Supported in the InfluxDB Cloud UI
schema package can retrieve schema information from the InfluxDB
Cloud user interface (UI), but not from the Flux REPL.
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.