Type error 15:6-21:6: cannot unify array with semantic.array

Not sure why I’m getting this error:

type error 15:6-21:6: cannot unify array with semantic.array

My query:

aeInBps = from(bucket: "bb_interfaces_test")
  |> range(start: -1h)
  |> filter(fn: (r) => r._measurement == "interfaces" and (r._field == "in-octets"))
  |> filter(fn: (r) => r.device =~ /chgobbrj01/)
  |> drop(columns:["path", "system_id"])
  |> group(columns: ["parent-ae-name","device"], mode:"by")
  |> aggregateWindow(every: 1m, fn: sum)
  |> derivative(unit: 1m, nonNegative: true, columns: ["_value"], timeColumn: "_time")
  |> map(fn: (r) => ({
      r with
      "_value": int(v:r._value) / 60 * 8,
      "_field": "ae-in-bps",
      "_measurement": "interfaces"
    }))
  |> to(
      bucket: "test",
      org: "cde",
      timeColumn: "_time",
      tagColumns:["parent-ae-name"],
      fieldFn: (r) => ({ "inbps": r._value })
    )

If I put a |> yield() instead of |> to() in the end the data is displayed correctly. I’m assuming there is some sort of syntax error but can’t seem to figure it out.

Thank you,
Mo

I have a similar problem and is happening for me with the ‘tagColumns’. When I remove it, the error is gone. Is this happening also for you? Did you find a solution for your problem?