Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Is it possible to use Grafana's Macros variables? #262

Closed
clemishow opened this issue Jul 28, 2020 · 4 comments · Fixed by #276
Closed

Is it possible to use Grafana's Macros variables? #262

clemishow opened this issue Jul 28, 2020 · 4 comments · Fixed by #276
Assignees

Comments

@clemishow
Copy link

https://grafana.com/docs/grafana/latest/features/datasources/mysql/#macros

Can I use this variables inside my SQL query?

Like _TABLE SUFFIX BETWEEN $__timeFrom() AND $__timeTo()

Because I get a bug every time I try to use one invalidQuery: Syntax error: Illegal input character "$" at

@clemishow clemishow changed the title Is it possible to use Macros Grafana variables? Is it possible to use Grafana's Macros variables? Jul 28, 2020
@strideynet
Copy link

I can't get this working either?

@LukeDefeo
Copy link

yes it possible. you can use $__from and $__to

@clemishow
Copy link
Author

Not working for me :
"invalidQuery: No matching signature for operator BETWEEN for argument types: STRING, INT64, INT64. Supported signature: (ANY) BETWEEN (ANY) AND (ANY) at [5:21]"

WHERE _TABLE_SUFFIX BETWEEN $__from AND $__to

@clemishow
Copy link
Author

Someone has a solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants