I want to create an app where I get data from an API and push the same data to a bigquery table.
I cant figure out how to send the data to bigquery.
My data is json type.
I tried with bigquery ressource query: insert into dataset.retool_table values {{JSON.stringify(query3.data)}}
but get the error : message:"Braced constructors are not supported at [1:48]"
What you are trying to insert has curly brackets which the error has pointed out.
If you feel lazy to do the transformation to fit the SQL syntax, I would suggest you change it to GUI mode and use Bulk Insert Records action type. Based on your example data above, you can chuck in {{query3.data.rows}} or just {{query3.data}} to the "Array of records to insert" field. You have to be sure that the keys in your data matches the table names of dataset.retool_table for this to work, otherwise, some of your columns will be empty/have null values.
I've created 2 bigquery ressources queries with the same credentials, the second one could not access GUI mode. I've rolled back to only one and it works.
And @jocen thanks for the solution, it works as expected and I can now push my data to bigquery!
Have a good one