influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
760 stars 152 forks source link

Unable to list field keys for a specific measurement in Grafana 9.4.7 with Flux #5412

Closed MatinF closed 1 year ago

MatinF commented 1 year ago

I have been using older versions of Grafana together with InfluxDB (Flux) for my dashboards.

As part of this, I have set up Variables to list all field keys for a specific measurement as below:

image

This worked in my previous setup, but no longer works in 9.4.7 - does the query need to be changed to be compatible with more recent versions?

I also tried below query instead, but it also does not work:

import "influxdata/influxdb/schema"

schema.measurementFieldKeys(
    bucket: "example-bucket",
    measurement: "example-measurement",
)