Explore your data schema with Flux
Use the buckets() function to list buckets in your organization.
Use the to list measurements in a bucket.
schema.measurements(bucket: "example-bucket")
Use the schema.measurementFieldKeys function to list field keys in a measurement.
import "influxdata/influxdb/schema"
schema.measurementFieldKeys(
bucket: "example-bucket",
)
Use the to list tag keys in a bucket.
schema.measurementTagKeys(
bucket: "example-bucket",
measurement: "example-measurement",
Use the schema.tagValues() function to list tag values for a given tag in a bucket.
Use the to list tag values for a given tag in a measurement. This function returns results from the last 30 days.
import "influxdata/influxdb/schema"
schema.measurementTagValues(
bucket: "example-bucket",
tag: "example-tag",
measurement: "example-measurement",