We recently upgraded to 6.7.3 use the new variable ${__org.name}. This we need to connect to a MySQL datasource with tables names identical to the Grafana org.name.
However the variable only seems to work at inital load of a dashboard. When changing the time picker to any value org.name does no longer work.
Example query:
SELECT count(number) as value from ${__org.name}
where $__timeFilter(date)
Query Inspector at initial dashboard load:
“sql”: “SELECT count(number) as value from JOE DOE
where date BETWEEN FROM_UNIXTIME(1583017200) AND FROM_UNIXTIME(1585691999)”
After changing time picker:
“sql”: “SELECT count(number) as value from ${__org.name}
where date BETWEEN FROM_UNIXTIME(1546297200) AND FROM_UNIXTIME(1577833199)”
Of course that connection to MySQL fails because of unknown table.
Any idea what might be wrong?
Best regards
Uwe