Is your feature request related to a problem? Please describe.
Currently I have my grafana dashboards as code. I would like to paramtertize the query parameters as much as possbile in order to not have things hardcoded in the query string.
For instance:
{
"database": ":database_name",
"datasource": {
"type": "grafana-timestream-datasource",
"uid": ":datasource_id"
},
"hide": true,
"measure": "sensor_1",
"rawQuery": "SELECT \r\n time,\r\n measure_value::double AS 'First Sensor'\r\n FROM $__database.$__table \r\nWHERE $__timeFilter\r\n AND measure_name = $__measure \r\n \r\nORDER BY time ASC",
"refId": "First Sensor",
"table": ":table_name"
}
I would like to have the query name, this is the refId parameter, as a variable in the rawQuery.
Describe the solution you'd like
An additional macro called $__refId. To be able to do the following query:
SELECT
time,
measure_value::double AS $__refId
FROM $__database.$__table
WHERE $__timeFilter
AND measure_name = $__measure
ORDER BY time ASC
Describe alternatives you've considered
NA
Additional context
Link to a petition in the grafana forum:
Is your feature request related to a problem? Please describe. Currently I have my grafana dashboards as code. I would like to paramtertize the query parameters as much as possbile in order to not have things hardcoded in the query string. For instance:
I would like to have the query name, this is the
refId
parameter, as a variable in the rawQuery.Describe the solution you'd like An additional macro called
$__refId
. To be able to do the following query:Describe alternatives you've considered NA Additional context Link to a petition in the grafana forum: