Retool GUI Query to Update a Single Record Not Working as Expected

I have a Retool query using the GUI config that updates a single record in a snowflake database.

When I preview the query, the output shows numberOfRecordsThatWouldBeUpdated: 1, however when I run the query I get the error:

statusCode:422
error:"Unprocessable Entity"
message:"Updating multiple records with this query has not been enabled."

My query was working no problem up until yesterday and I didn’t make any changes. The only way I can get it to work now is to check “Allow this query to modify multiple rows in the database?” (what exactly does this do?)

I’ve confirmed there are no duplicates in my database. I think this might be a new Retool bug.



2 Likes

@sgodoshian Hmmm interesting.

Could you share/export app JSON for me to clone and try to reproduce?

That is so odd the checkbox fixes the issue. I was have guessed that the box would throw an error and turning it off would fix it :sweat_smile:

Not sure what the box checking is doing under the hood, my guess is that it might be modifying something in the query during query build.

My guess is that the box turns off the error checking, with the bug being in the detection of how many rows are being updated. Which is somehow coming back as a false positive even though the preview confirms the query is set up to only modify one row as intended...

1 Like