You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for custom “display names” in Template Variable (#97)
* Add text and value Field for Template Variable
---------
Co-authored-by: Sebastian Balz <[email protected]>
Co-authored-by: Julien Millau <[email protected]>
Co-authored-by: Julien Millau <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,13 @@ SELECT column FROM table WHERE column in ${variable:regex}
145
145
SELECT column FROM table WHERE column in (test1|test2)
146
146
```
147
147
148
+
Add a Template Variable:<br/>
149
+
You can use a SQL Query to define a [Template Variable](https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#add-a-query-variable)<br/>
150
+
```sql
151
+
-- Add __text and __value columns to your query to support custom "display names"
152
+
SELECT value_column as __value, text_column as __text FROM table
0 commit comments