您可以使用InfluxDB查询语言(InfluxQL)来检索所有字段数据。以下是一个示例查询:

SELECT * FROM <measurement_name>

在上面的查询中,您需要将 <measurement_name> 替换为要查询的测量名称。此查询将返回该测量中所有字段的所有数据。

如果您使用InfluxDB 2.0或更高版本,则可以使用Flux查询语言来检索所有字段数据。以下是一个示例查询:

from(bucket: "<bucket_name>")
  |> range(start: <start_time>, stop: <stop_time>)
  |> filter(fn: (r) => r["_measurement"] == "<measurement_name>")
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")

在上面的查询中,您需要将 <bucket_name> 替换为要查询的Bucket名称, <start_time><stop_time> 替换为要查询的时间范围, <measurement_name> 替换为要查询的测量名称。此查询将返回该测量中所有字段的所有数据。

influxdb_client 如何把所有的_filed数据查出来

原文地址: https://www.cveoy.top/t/topic/bVeh 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录