Explore your data schema with Flux

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

    Use the to list measurements in a bucket.

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

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

    1. import "influxdata/influxdb/schema"
    2. schema.measurementFieldKeys(
    3. bucket: "example-bucket",
    4. )

    Use the to list tag keys in a bucket.

    1. schema.measurementTagKeys(
    2. bucket: "example-bucket",
    3. 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.

    1. import "influxdata/influxdb/schema"
    2. schema.measurementTagValues(
    3. bucket: "example-bucket",
    4. tag: "example-tag",
    5. measurement: "example-measurement",