Dashboard datasource type variables returns uid, not name

Hi everyone… I am running into an issue with using variables with Grafana accessing ADX datasource. I am running following grafana version:
curl -X GET ‘http://localhost:3000/api/health
{
“commit”: “302831c12531f0245f17964d1f16c85db80a4c86”,
“database”: “ok”,
“version”: “11.0.1”
}%
I created the datasource as shown in the first picture. The data source creation is successful as can be seen from the save & test.
Now, I am creating a “query” type variable which is a simple KQL query as shown in the 3rd screenshot. Surprisingly, the $Datasource variable is getting expanded with the datasource uid instead of the datasource name and hence the o/p of this variable is coming to be an empty string.
Can someone please guide what it is that I am doing wrong. This worked fine with older versions of grafana (running fine in Grafana v8.3.4 (a551d74b11)
Will be happy to provide more info.

Thank you so much for the quick response @jangaraj .

Unfortunately, I am still seeing the problem. Please see the attached screenshots with the updated query and the network request/response generated.

You have wrong syntax. ${Datasource:text} vs ${Datasource.text} - please note there is one dot difference only and one is wrong and one should be correct.

1 Like