Problem
Sometimes, when using Holistics, you would see the error message like this
ERROR: column "error_not_selected" does not exists in
or
ERROR: invalid input syntax for integer: "opt_1" LINE 6: where id = 'opt_1' ^
It’s mostly because of your drop-down filter select option All
Or when the filter is not selected
And be used in the query condition
SELECT *
FROM "locations"."countries"
where id = {{my_dropdown}}
Solution
To fix this, there are two approaches:
- Wrap the condition with
[[ ]]
:
SELECT *
FROM "locations"."countries"
where [[id = {{my_dropdown}}]]
- Or remove option
All
and set default option
Happy analyzing!