Wanted - Filter out the value in influxdb, for which a point does not exists
Expected behavior:
InfluxDB should show nothing (no error should come)
Actual behavior:
InfluxDB showing invalid memory address or nil pointer dereference
Environment info:
- InfluxDB version: 2.0.9 where the query is working, and 2.4.0 where query is not working
Below is the query -
import "strings"
import "date"
import "regexp"
src_bucket = "test_bucket"
src_measurement = "gnb_om"
start_time = 2023-03-28T04:00:00Z
stop_time = 2023-03-28T05:00:00Z
from(bucket: src_bucket)
|> range(start: start_time,stop: stop_time)
|> filter(fn: (r) => r["_measurement"] == src_measurement)
|> filter(fn: (r) => r["_field"] == "VS_HO_Msg3RcvdCountforSgNBAddition" or r["_field"] == "OR_ENDCPROCEDURE_SgnbAddAttemptCell" )
|> truncateTimeColumn(unit: 1m)
|> toFloat()
|> group(columns: ["_time","NID","cell"])
|> aggregateWindow(every: 1h, fn: count)
//|> filter(fn: (r) => r["_value"] == 1)
|> yield(name: "count")
|> findRecord(fn: (key) => true, idx: 0)
Attached csv file -
2023-04-12-13-51_influxdb_data.txt (6.4 KB)