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
{{ message }}
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.
Attempting to use a variable in the WHERE clause as: WHERE column_name = $variable/string
or WHERE column_name = [[variable]]/string
For variable contents: "foo" this should expand to 'foo/string'.
Instead it expands to 'foo'/string.
Similar behavior seems to have been discussed for the MySQL and PostgreSQL (grafana/grafana#9611) but this still seems to be a problem for the Crate datasource.
The text was updated successfully, but these errors were encountered:
On further investigation, I did find that this works as a workaround: WHERE column_name = $variable || '/string'
This seems to be contrary to the Grafana documentation on how this should work, however.
Hello,
I had the same sort of issue trying to use a variable in a WHERE clause in the metrics interface WHERE column_name like $variable
or WHERE column_name like [[variable]]
is translated in the query as : WHERE column_name like ''<variable value>'' the 2 single quotes surround,
results in an sql error...
I manage to workaround the problem by adding '' || before $variable to have: WHERE column_name like '' || $variable
in the metrics interface avoid the issue in the query: SELECT ... WHERE ... AND column_name like '' || '<variable value>' GROUP...
which success and behave as wanted too ;O)
Thanks a lot for your input! With our latest effort, the PostgreSQL implementation of Grafana works fine with CrateDB. Hence, we skip the Grafana Datasource Plugin for CrateDB and move over to the PostgreSQL data source. In case you wanna read more about how to pair CrateDB and Grafana, please take a look at this blog post of ours.
Best, Stephanie
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attempting to use a variable in the WHERE clause as:
WHERE column_name = $variable/string
or
WHERE column_name = [[variable]]/string
For variable contents: "foo" this should expand to
'foo/string'
.Instead it expands to
'foo'/string
.Similar behavior seems to have been discussed for the MySQL and PostgreSQL (grafana/grafana#9611) but this still seems to be a problem for the Crate datasource.
The text was updated successfully, but these errors were encountered: