JSON file as data source

Hi,

I am persisting data as JSON in the S3 bucket. To the user, data is rendered in the editable table by reading the JSON from S3 bucket.
Each record in the JSON is uniquely identified by the ID field.

User can edit the data in the table(except ID column) and can also add new rows in the table.

I am trying to persist the final data JSON back in S3 using upload data action.

I tried persisting by specifying upload data as {{table1.data}} , there are no error messages, however it doesn't include changes done by the user.

Please advice how to achieve this.

You will want to use bulk update

Check out https://docs.retool.com/docs/sql-writes#bulk-updates

Hmm.. :thinking: I'm not sure we have a bulk update function for S3.

@paliwalg if your users are making edits in your table those edits won't be immediately available in {{ table1.data }}, they'll be in table1.recordUpdates and table1.changeSet. It's possible to use a transformer to integrate these into your table data before passing it to your query, though. Can you try the following and let us know if it works?

{{table1.data.map((row, i) => Object.assign(row, table1.changeSet[i]))}}

Thanks ... I got it working using the recordsUpdates

This action Type for bulk upload is not available for AWS S3 file upload