Alert rule execute report error: response error &{sql: expected 1 arguments, got 0 A

I am using plugin integrate with Mircosoft SQL Server.
Because i want to show repeat multi-panel in one page and using variable in the Query sql statement as below:

select
date as time ,
sell - buy ,
‘diff’ as metric
from ${tblfiltbycoinpair:csv}
WHERE
$__timeFilter(date)
ORDER BY 1

data displays is find.
But when i am testing the rule config as before, then it show an error:
error:“tsdb.HandleRequest() response error &{sql: expected 1 arguments, got 0 A 0xc042b7bed0 }”

I think it’s because my query sql is using a variable then grafana cant do that.

Any one can help me solve it will be great appreciate.

Template variables is not supported for alert rules. There’s an open issue https://github.com/grafana/grafana/issues/6557

Marcus

Thanks a lot.

Hoping for grafana support variables for alert rules soon…

Any news about this?