Documentation

schema.measurements() function

The schema.measurements() function returns a list of measurements in a specific bucket. The return value is always a single table with a single column, _value.

import "influxdata/influxdb/schema"

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

Parameters

bucket

Bucket to retrieve measurements from.

start

Earliest time to include in results. Default is -30d.

Relative start times are defined using negative durations. Negative durations are relative to now. Absolute start times are defined using time values.

stop

Latest time to include in results. Default is now().

The stop time is exclusive, meaning values with a time equal to stop time are excluded from results. Relative start times are defined using negative durations. Negative durations are relative to now(). Absolute start times are defined using time values.

Examples

Return all measurements in a bucket

import "influxdata/influxdb/schema"

measurements(bucket: "example-bucket")

Return all measurements in a bucket from a non-default time range

import "influxdata/influxdb/schema"

measurements(bucket: "example-bucket", start: -90d, stop: -60d)

Not supported in the Flux REPL

schema functions can retrieve schema information when executed within the context of InfluxDB, but not from the Flux REPL.


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.