schema.measurementTagValues() 函数
schema.measurementTagValues()
返回特定测量下的标签值列表。
结果包含一个单列表,该列表只有一个名为 _value
的列。
函数类型签名
(
bucket: string,
measurement: A,
tag: string,
?start: B,
?stop: C,
) => stream[D] where A: Equatable, D: Record
更多信息请查看函数类型签名。
参数
bucket
(必需)从指定的测量中返回标签值的存储桶。
measurement
(必需)从中返回标签值的测量。
tag
(必需)从中返回所有唯一值的标签。
start
包含在结果中的最早时间。 默认为 -30d
。
stop
包含在结果中的最晚时间。 停止时间不包括在内,这意味着时间等于停止时间的值将从结果中排除。 默认为 now()
。
示例
从 InfluxDB 测量中查询唯一的标签值
import "influxdata/influxdb/schema"
schema.measurementTagValues(
bucket: "example-bucket",
measurement: "example-measurement",
tag: "example-tag",
)
Flux REPL 不支持
schema
函数可以在 InfluxDB 的上下文中执行时检索架构信息,但不能从Flux REPL中检索。
此页是否对您有帮助?
感谢您的反馈!