MySQL Delete using IN Clause not deleting all rows

Hi! So I am trying to delete multiple rows in a MySql database by selecting rows from a table (Multiselect) and passing it the MySQL query as shown in the screenshot. The query goes through and the trigger for refreshing table on success works. But the table still shows rows that were supposed to be deleted (~ 900 keys are given, i still see around 120-200 rows in the table after refresh). Any idea why?

Screenshot 2023-12-07 at 12.23.18 PM

Anyone?

How does it handle the same query if you use = ANY({{test.data}}) instead of the IN clause?

Gives a SQL syntax error.

Hi @Haseeb1399 Thanks for reaching out. Looking at our docs, IN should work for arrays in MySQL queries

If you hardcode an array of ids like the below example, does it work?

DELETE FROM yelp_accountria_similarity WHERE yelp_accountria_similarity.created_at IN ({{[1699, 2101]}})

If not, is that created_at column a unique column with matching records for 1699, 2101, etc?

Do you have the prepared statements setting disabled on your MySQL resource settings? Disabling this setting is not recommended as it can have security risks and can also lead to syntax issues