When I query with sum function with REST API, I get the following error.
And I tried this flux code with vscode exteion, work well.
from(bucket: “sample”)
|> range(start: 2023-05-16T00:00:00Z, stop: 2023-05-17T00:00:00Z)
|> filter(fn: (r) => r._measurement == “sample” and r.event_id == “110” and exists r.name)
|> group(columns: [“room_id”, “name”])
|> sum()
|> yield()
CollectRows ERROR HttpError: Error creating group plans for namespace ‘e2f664242ee5686c_8d8038108d71abad’: read_group: gRPC planner got error building plan: Error during planning: The function Sum does not support inputs of type Utf8.
caused by
Error during planning: The function Sum does not support inputs of type Utf8.
at L.throwOnErrorResponse (FetchTransport.ts:164:1)
at async FetchTransport.ts:100:1
If I use the aggregateWindow function as below, it works normally, but I want to get the sum over the entire period.
aggregateWindow(every: 1d, fn: sum, column: "_value")
Please advice to solve this problem.
Thanks