There is a bug we face with prepared statement in Retool when we apply multiple inputs as filters for SQL queries for Snowflake.
Here are the steps to reproduce it:
Hello, @aturiot thanks for such a well-written post!
The array structure for snowflake syntax is a little unusual so we have created an SQL cheatsheet that gives a tip on how to achieve snowflake's array contains function in Retool.
For your example, you'll want to use
SELECT COL1, COL2
FROM SANDBOX.TEST_RETOOL
WHERE COL1 = {{ select1.value }}
AND ARRAY_CONTAINS(COL2::variant, SPLIT({{multiselect2.value.join( )}}, ',') )
@Amanda Thank you Amanda, I confirm that the suggestion works as expected
It could be great to put forward this SQL cheatsheet link in case of SQL compilation error like here, because the current error is cryptic and hard to debug.