Retool Database - Return UUID after Insert

JS is not my strongest, but I would re-map the values first using a JS Query or Transformer with something like this:

const data = query12.data;
return dataArray = data.map(({ build_id, filename }) => [build_id, filename]);

Then use the output of this to insert into you db

insert into test (build_id, file_name)
values {{jsquery.data}}
returning _id
1 Like