-
What Grafana version and what operating system are you using?
v10.4.2, Linux -
What are you trying to achieve?
Have some sort of Apache SuperSetDataSet
concept - store common part of query string and refer to it while building per-chart queries. -
How are you trying to achieve it?
I tried to use const/textbox hidden variables and refer to them in query as${common_part:raw}
. Raw format preserves quotes in original query as is. -
What happened?
The problem is that variables used in common query are not substituted. Thiscommon_part
query uses dashboard variables inWHERE
clause and I want them to be substituted with their values - it is like to apply “eval” tocommon_part
content. -
What did you expect to happen?
Have a format that will apply eval to variable. Or have better native support for sharing common parts of queries.
Is there a way to store query and then refer to it in other queries as a sub-query?