mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
mysql: docs for on time range change refresh mode for template queries
This commit is contained in:
parent
794c4b50d1
commit
5325972aa4
@ -146,6 +146,12 @@ the hosts variable only show hosts from the current selected region with a query
|
||||
SELECT hostname FROM my_host WHERE region IN($region)
|
||||
```
|
||||
|
||||
To use time range dependent macros like `$__timeFilter(column)` in your query, the refresh mode of the template variable needs to be set to *On Time Range Change*.
|
||||
|
||||
```sql
|
||||
SELECT event_name FROM event_log WHERE $__timeFilter(time_column)
|
||||
```
|
||||
|
||||
### Using Variables in Queries
|
||||
|
||||
From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
|
||||
|
Loading…
Reference in New Issue
Block a user