'Unknown Flux error on filter: "500 Internal Server Error: loc 0:0-0:0: pipe destination is missing"

Very new to grafana, influxdb, and K6. Attempting to put together a API performance test pipeline. K6 data > influxdb > grafana. I switch to using FLUX queries instead of InfluxQL so that I can do joins and other more complicated queries. I'm running v1.8 of InfluxDB (> v2.x has some compatibility issues with K6).

If I run something like the following in Kabana Explore (or directly via the cli against the db):

from(bucket: "k6/autogen")
  |> range(start: -1090m)

it runs without error. However when I add a filter:

from(bucket: "k6/autogen")
  |> range(start: -1090m)
  |> filter(fn: (r) => r._measurement == "new_counter", onEmpty: "keep")

I all of a sudden get the following error: 500 Internal Server Error: loc 0:0-0:0: pipe destination is missing.

I'm sure I'm missing something obvious but I can't find any support on this error anywhere and I've looked up dozens of examples and they all seem to be composed in the same manner. I've also tried many variants of the filter statement with the same result. Please help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source