schema.tagKeys() function
schema.tagKeys()
returns a list of tag keys for all series that match the predicate
.
Results include a single table with a single column, _value
.
函数类型签名
(
bucket: string,
?predicate: (
r: {
A with
_value: B,
_time: time,
_stop: time,
_start: time,
_measurement: string,
_field: string,
},
) => bool,
?start: C,
?stop: D,
) => stream[E] where E: Record
更多信息,请参见函数类型签名。
参数
bucket
(必需)从中返回标签键的 Bucket。
predicate
过滤标签键的谓词函数。 默认为 (r) => true
。
start
包含在结果中的最早时间。 默认为 -30d
。
stop
包含在结果中的最新时间。停止时间不包含在内,这意味着时间等于停止时间的值将从结果中排除。默认为 now()
。
相对开始时间使用负持续时间定义。负持续时间相对于 now()
。绝对开始时间使用时间值定义。
示例
查询 InfluxDB bucket 中的标签键
import "influxdata/influxdb/schema"
schema.tagKeys(bucket: "example-bucket")
Flux REPL 中不支持
schema
函数可以在 InfluxDB 上下文中执行时检索架构信息,但不能从 Flux REPL 检索。
此页内容是否对您有帮助?
感谢您的反馈!