Cannot get basic group query to work in flux

My influxdb instance is v1.8.0. I am attempting to get this query

select * from "queries" WHERE time > now() - 5m and tap_type='CLIENT_QUERY' group by qaddress

to work using flux. I believe this is the flux equivalent:

from(bucket:"dns")
  |> range(start:-5m)
  |> filter(fn:(r) => r._measurement == "queries" and r.tap_type == "CLIENT_QUERY")
  |> group(columns: ["qaddress"])

The non-flux query works great. The flux query displays the first table, then dies with

Error: expected string cursor type, got *reads.integerMultiShardArrayCursor

What am I doing wrong?

EDIT: I just tried it with influxdb v2.0 beta, and I get the same result, just a slightly different error:

Error: schema collision: cannot group string and integer types together

Figured it out. This query works:

from(bucket:"dns")
  |> range(start:-5m)
  |> filter(fn:(r) => r._measurement == "queries" and r.tap_type == "CLIENT_QUERY" and r._field == "id")
  |> group(columns: ["qaddress"])

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.