Table with Influx 2.0

Ho i see it now, i was blind !
You created a single _field for all your value, and you use a _measurement as a _field,
It’s not a standard structure, you should consider to change it.
You can still make this work by changing your pivot like that :

from(bucket: "ShellyInfo")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] == "value")
  |> filter(fn: (r) => r["_measurement"] == "ID" or r["_measurement"] == "fw_ver" or r["_measurement"] == "ip" or r["_measurement"] == "model" or r["_measurement"] == "new_fw" or r["_measurement"] == "wifi_sta.connected" or r["_measurement"] == "wifi_sta.ip" or r["_measurement"] == "wifi_sta.rssi" or r["_measurement"] == "wifi_sta.ssid")
|> group(columns :["_time"])
   |> pivot(rowKey:["_time"], columnKey: ["_measurement"], valueColumn: "_value")
|> group()
  |> yield(name: "query_name")

or maybe this

 |> pivot(rowKey:["_time"], columnKey: ["_measurement"], valueColumn: "_field")

not sure

1 Like