Insert into resource using SQL mode

Hi! I would like add functionality to my app that allows users to select rows in table 1 and add them to a different table 2 of their choice. I'm using SQL mode and have been trying to insert one row:

INSERT INTO panel_test VALUES ('{{JSON.stringify([0])}}');

However, this inserts all 42 keys into one column - I'm assuming because the returning VALUES are contained in { }.

I know bulk inserting rows is possible using GUI mode, but I would like to allow the user to dynamically select "table 2" to be any table of their choice, which I haven't been able to find in GUI mode. Is there any way to call the INSERT INTO statement for using SQL mode, or a way to allow users to select the target table for bulk insert in GUI mode?

Hi @flyinghedgehogs Thanks for reaching out! We are tracking a feature request for this use case internally. I'll post back here when we're able to ship a feature for dynamic sql table names in GUI mode.

In the meantime, my best recommendation is to make a GUI mode query for each table and call the queries dynamically based on the user input.

Working with SQL mode in this way can be fairly tricky, as articulated in this community post For example, I was able to get this hacky code working, with prepared statements disabled.