Grafana Template Variables

65 views
Skip to first unread message

hoffmanroni

unread,
Apr 5, 2019, 1:14:15 PM4/5/19
to AquaQ kdb+/TorQ
Is there a way to use the grafana variables within the function/queries using grafana.q?

For example in Grafana you can add a template variable to the dashboard.  Then you can use that in your queries by precedding with $.

So for example I added a Date variable

Annotation 2019-04-05 125220.jpg














then you can reference that variable with $Date in the function/query.  So you can have something like

f.getData[$Date;$Syms]

I had to change line 83 in grafana.q to 

rqt:ssr[raze rqt[`targets]`target;"\\";""];

because for some reason the var is getting down to grafana.q with \\, but there may be a better place to do that.

I can't however get the template variables to work with a query, it wont pull them properly.


Annotation 2019-04-05 131201.jpg
Reply all
Reply to author
Forward
0 new messages