Hello Retool Community!
I've been encountering an issue where external variables in my SQL statements are not appearing correctly in my SQL Statement previews. That is, my SQL statements are not being rendered as prepared statements in the previews, event though they work as intended when I actually run the query.
In the first screenshot, "ADAIR" is coming from a select field in my dashboard. The issue is
ADAIR
should actually be
["ADAIR"]
When I hover over the variable in the query, it shows the correct value.
I had previously checked the "Disable converting queries to prepared statements" option for this query's resource, then unchecked it later. It seems the SQL statement preview still thinks that option is checked. Toggling this option back and forth does not fix this issue.
My queries work as intended (i.e. ["ADAIR"] is used in the query), but this gets in the way of troubleshooting my queries. I would like to copy the query and tinker with it outside of Retool, but this becomes an obstacle.
Any help here would be greatly appreciated!