Operato Windrose - Problems to plot

Hello dear community,

I’ve recently installed the Operato Windrose plugin (Operato Windrose plugin for Grafana | Grafana Labs).

As per its instruction, data must follow the names wind_speed and wind_direction, such as:

SELECT 
    wind_weather_data.speed AS wind_speed, 
    wind_weather_data.direction AS wind_direction
FROM wind_weather_data
WHERE wind_weather_data.time BETWEEN '2023-05-02T00:00:00Z' AND '2023-05-02T023:59:59Z'

I tried doing as similar as possible in a single InfluxDB query like this:

SELECT 
  mean(value_speed) AS "wind_speed",
  mean(value_dir) AS "wind_direction"
FROM (
  SELECT 
    "value" AS "value_speed" 
  FROM /site\.groups\.sensor\.wind_speed_avg/ 
  WHERE $timeFilter
), (
  SELECT 
    "value" AS "value_dir" 
  FROM /site\.groups\.sensor\.wind_direction_vct/ 
  WHERE $timeFilter
)
GROUP BY time($__interval) fill(none)

This retrieves the two variables in the desired names, but it also duplicates each variable, creating duplicated empty series (see graph below).

I also tried with 2 different queries, A and B, and some transformations (join by field, and organize by name) like this:

SELECT mean(“value”) AS wind_speed
FROM /site.groups.sensor.wind_speed_avg/
WHERE $timeFilter
GROUP BY time($__interval) fill(none)

None of the attempts work.

I am able to visualize the data in a TimeSeries, but not with Operato Windrose:

Attempt 1

Attempt 2



Any idea why it isn’t working?

Thanks a lot for your help !

emulating your data shows it working for me

Thank you @yosiasz,

Indeed, I tested it with a mockup CSV content and it works:

So, it confirms that the issue is related to my influxDB data structure.

I double checked this, and, besides the “AS” inside my query, I renamed the variable in the Alias by, like this:
SELECT mean(“value”) AS wind_speed
FROM /site.group.sensor.wind_speed_avg/
WHERE $timeFilter
GROUP BY time($__interval) fill(none)

image
Not sure why it is needed as it was already declared “AS wind_speed”, but it does work !!

The CSV helped me confirming that it works with the Join by fields transformation, and to focus on the other aspect, so thanks a lot for that :slight_smile: