I am inserting to a postgres database based on selected rows
Thanks @markbenepass for his helpful post
my_script (a js query) returns the following (it uses JSON.stringify)
"[{"lane_uuid":"5ad0fb16-2733-4ec6-b8ee-dec56dbfd19d","date_added":"09/27/2022, 16:53:58","added_by":"lee.walter@abc_company.com","block_type":"FULL"},{"lane_uuid":"8ff3fbea-220b-4314-827f-fd9f767b09c1","date_added":"09/27/2022, 16:53:58","added_by":"lee.walter@abc_company.com","block_type":"FULL"},{"lane_uuid":"8ff3fbea-220b-4314-827f-fd9f767b09c1","date_added":"09/27/2022, 16:53:58","added_by":"lee.walter@abc_company.com","block_type":"FULL"}]"
A separate sql query tries to instert this into a postgres database
INSERT INTO u_quotes.block_list2 VALUES {{my_script.data}})
and received a syntax error. I tried also
INSERT INTO u_quotes.block_list2 VALUES ({{my_script.data}}))
Any idea why this doesnt work? Could this be because JSON stringify inserts square brackets which sql cannot handle?