3.7 KiB
title | list_title | description | influxdb/v2.0/tags | menu | weight | aliases | related | list_code_example | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Explore your data schema with Flux | Explore your schema | Flux provides functions that let you explore the structure and schema of your data stored in InfluxDB. |
|
|
206 |
|
|
```js import "influxdata/influxdb/v1" // List buckets buckets() // List measurements v1.measurements(bucket: "example-bucket") // List field keys v1.fieldKeys(bucket: "example-bucket") // List tag keys v1.tagKeys(bucket: "example-bucket") // List tag values v1.tagValues(bucket: "example-bucket", tag: "example-tag") ``` |
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 v1.measurements()
function
to list measurements in a bucket.
import "influxdata/influxdb/v1"
v1.measurements(bucket: "example-bucket")
List field keys
Use the v1.fieldKeys
function
to list field keys in a bucket.
import "influxdata/influxdb/v1"
v1.fieldKeys(bucket: "example-bucket")
List fields in a measurement
Use the v1.measurementFieldKeys
function
to list field keys in a measurement.
import "influxdata/influxdb/v1"
v1.measurementFieldKeys(
bucket: "example-bucket",
measurement: "example-measurement"
)
List tag keys
Use the v1.tagKeys()
function
to list tag keys in a bucket.
import "influxdata/influxdb/v1"
v1.tagKeys(bucket: "example-bucket")
List tag keys in a measurement
Use the v1.measurementTagKeys
function
to list tag keys in a measurement.
This function returns results from the last 30 days.
import "influxdata/influxdb/v1"
v1.measurementTagKeys(
bucket: "example-bucket",
measurement: "example-measurement"
)
List tag values
Use the v1.tagValues()
function
to list tag values for a given tag in a bucket.
import "influxdata/influxdb/v1"
v1.tagValues(bucket: "example-bucket", tag: "example-tag")
List tag values in a measurement
Use the v1.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/v1"
v1.measurementTagValues(
bucket: "example-bucket",
tag: "example-tag",
measurement: "example-measurement"
)