文档

schema.measurements() function

schema.measurements() returns a list of measurements in a specific bucket.

Results include a single table with a single column, _value.

Function type signature
(bucket: string, ?start: A, ?stop: B) => stream[C] where C: Record

For more information, see Function type signatures.

Parameters

bucket

(Required) Bucket to retrieve measurements from.

start

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

stop

Newest time include in results. The stop time is exclusive, meaning values with a time equal to stop time are excluded from the results. Default is now().

Examples

Return a list of measurements in an InfluxDB bucket

import "influxdata/influxdb/schema"

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

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.


Was this page helpful?

Thank you for your feedback!


Flux 的未来

Flux 将进入维护模式。您可以继续像现在一样使用它,而无需对您的代码进行任何更改。

阅读更多

InfluxDB 3 开源版现在处于公开 Alpha 阶段

InfluxDB 3 开源版现在可用于 alpha 测试,根据 MIT 或 Apache 2 许可授权。

我们正在发布两个产品作为 alpha 的一部分。

InfluxDB 3 Core 是我们新的开源产品。它是一个用于时间序列和事件数据的最新数据引擎。 InfluxDB 3 Enterprise 是一个基于 Core 基础构建的商业版本,增加了历史查询功能、读取副本、高可用性、可扩展性和细粒度的安全性。

有关如何开始使用的更多信息,请查看