Reputation: 1
I try to visualize weeds' species heatmaps in Grafana. I'm using data stored in InfluxDB. I want to add a filter to visualise the map of the selected species. For that I'm using a Grafana variable.
My variable selectspecies is like that : selectspecies variable There is a link with my InfluxDB and the query :
SELECT "species" FROM "heatmap_data".
In Preview of values I indeed see my species.
In the dashboard I'm using geomap to visualise a heatmap. heatmap dashboard I configured this SQL query :
SELECT "latitude", "count", "longitude", "species"
FROM "heatmap_data"
WHERE "time" <= $__timeTo
AND "time" >= $__timeFrom
AND "species" = 'selectspecies'
But then I have no data ouput.
If I select directly the species it does work :
SELECT "latitude", "count", "longitude", "species"
FROM "heatmap_data"
WHERE "time" <= $__timeTo
AND "time" >= $__timeFrom
AND "species" = 'common nettle'
I tried this with my species as tags and as fields in Influx but in all cases it doesnt work. I also tried a custom variable in Grafana to test (adding manually the species) but it also doesnt work. So it's probably related to the way the content of the variable is processed by the SQL query.
Thank you very much for your help!
Upvotes: 0
Views: 22