Bulk Insert Custom Columns into MySQL Database

Hello Retool team, I'm currently pulling data from an API by uploading a CSV and passing one of the columns to the API call. I upload the CSV to table1 pictured below, and use the submit button to trigger the API call(Get_Data)

I am then using table2 to display the data from the API call and bulk inserting the data returned from each row into a MySQL database using the SQL GUI as pictured below.

The issue is I need to insert the APN and another column from table1 along with the records returned by the API.

I tried doing this by adding custom columns into table2 however even though the rest of the data was inserted, the two custom columns were left blank in my database.

Is it possible to bulk insert these columns along with the rest of the data? or would I have to try another method?


Hey there :wave:

Custom columns are frontend-only for the most part, so they can't be accessed outside of the table unfortunately. Would you be able to structure the data how you need in a transformer and populate table2 with that transformer.value instead of using custom columns for this use case?

Hey @lauren.gus ,

Unfortunately i'm unfamiliar with transformers.

Would you be able to walk me through how I would do that?

I am linking you our docs on transformers here. Here is a quick example where I am just creating a new column (array) and adding it to my query.data: