My variable contains a SQL query of the form SELECT t.ref_obj as Objet … FROM t … WHERE … ORDER BY. I want to execute/copy the entire query a my request is dynamic (variable content), in the query editor in Grafana to see the result. How do I do that?"
You can declare variable and use it as a parameter in your query (i.e. SELECT ... FROM ... WHERE ... = '${var_query_param}'
Or you can declare variable that contains several different queries, in this case in query editor you can just specify ${var_query}
See an example of declaration below
1 Like
Thank you so much
I have a query “SELECT * from add_condition($list,$Selected);” that allows to display another modified query "select t.pkey as “N…”, t.ref_obj as Objet, lxstationlabel(o) as "Ouvrage…etc, that I want to execute on a panel. how do I do it ? given that I don’t want yo use in a variable because I already use already two variables