influxdb-client-go
influxdb-client-go copied to clipboard
join.time result is empty
Specifications
- Client Version: v2.10.0
- InfluxDB Version: v.24
- Platform: unbuntu22.04
Steps to reproduce
1.flux: flux1.flux `left = from(bucket: "alarm") |> range(start: -24h) |> filter(fn: (r) => r._measurement == "alarm" and strings.containsStr(v: r.taskName, substr: "a") and r.error == "type") |> group()
right = from(bucket: "alarm") |> range(start: -24h) |> filter(fn: (r) => r._measurement == "alarm_prevent") |> group()
joins = join.time( left: left, right: right, as: (l, r) => ({l with expiredField: r.expiredField}), ) yield joins` 2. flux flux1.flux, it return data 3.result, err := queryAPI.Query(context.Background(), fluxScriptStr); it return empty ...
Expected behavior
return data
Actual behavior
retrun empty
Additional info
No response
@wuwenrufeng, does the query returns any data in Data Explorer?
I see you are using the default join method 'inner' (w/o using the method param for join.time), which often leads to an empty result.
If it works OK in Data Explorer, how do you read data using the client? Does the call result.Next() returns false? Do you check result.Err()?
@wuwenrufeng, anything new?