Documentation

Explore your data schema with Flux

Flux provides functions that let you explore the structure and schema of your data stored in InfluxDB.

List buckets

Use the buckets() function to list buckets in your organization.

buckets()

List measurements

Use the schema.measurements() function to list measurements in a bucket.

import "influxdata/influxdb/schema"

schema.measurements(bucket: "example-bucket")

List field keys

Use the schema.fieldKeys function to list field keys in a bucket.

import "influxdata/influxdb/schema"

schema.fieldKeys(bucket: "example-bucket")

List fields in a measurement

Use the schema.measurementFieldKeys function to list field keys in a measurement.

import "influxdata/influxdb/schema"

schema.measurementFieldKeys(
  bucket: "example-bucket",
  measurement: "example-measurement"
)

List tag keys

Use the schema.tagKeys() function to list tag keys in a bucket.

import "influxdata/influxdb/schema"

schema.tagKeys(bucket: "example-bucket")

List tag keys in a measurement

Use the schema.measurementTagKeys function to list tag keys in a measurement. This function returns results from the last 30 days.

import "influxdata/influxdb/schema"

schema.measurementTagKeys(
  bucket: "example-bucket",
  measurement: "example-measurement"
)

List tag values

Use the schema.tagValues() function to list tag values for a given tag in a bucket.

import "influxdata/influxdb/schema"

schema.tagValues(bucket: "example-bucket", tag: "example-tag")

List tag values in a measurement

Use the schema.measurementTagValues function 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"
)

New! 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: