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
I have a MySQL database as a source for a QL-chart.
I have a parameter (string) that can have one or multiple values.
According to the documentation, “If the query contains the IN operator before a parameter, the substituted value is always converted into a tuple. Such a query will work correctly if you select one or more values.”
However, when I use only one value, it doesn’t work as expected — the value is not converted into a tuple and remains a string.
The text was updated successfully, but these errors were encountered:
ktselishev
changed the title
Problem with parametrs in QL-chart and MySQL
Problem with parameters in QL-chart and MySQL
Oct 3, 2024
Thanks for your issue and sorry for the inconvinience.
According to the documentation, “If the query contains the IN operator before a parameter, the substituted value is always converted into a tuple. Such a query will work correctly if you select one or more values.”
In fact this is the issue. These rules apply only for ClickHouse and PostgreSQL connections. We will update the documentation soon.
Workaround for MySQL can be: SELECT * FROM users WHERE name IN {{name}}
And if you need to use only one value in name, you may fill name with this value twice.
The text was updated successfully, but these errors were encountered: