DynamoDB GUI tables, with edit

I have a read-only UI Table in retool, linked to a DynamoDB table. There are multiple fields/columns.
One is a simple number, and I want to make this column "editable", then save changes to the db.
I've done this in the past with a postgres db and retool: basically I have to create a function to "bulk update with primary key", then bind it to the table's "Save" action listener, and pass to it the array of changeset.

Hey @Nicolo_Paternoster

To make a column in your UI Table editable and save changes back to your DynamoDB table in Retool, follow these steps:

  1. Make Column Editable:
    1. In your UI Table, select the column you want to make editable.
    2. Click Make editable to enable editing for that column.

  2. Create a Resource Query:
    3. Navigate to the Code tab and click + to add a new Resource query.
    4. Select the appropriate resource type for your DynamoDB.
    5. Choose PATCH action if you're updating existing records.
    6. In the Body of the request, use the following to reference the changeset:

{{ table1.changesetArray }}
7. Configure the query with the necessary parameters (e.g., table name, primary key).
  1. Set Up the Save Action:
    8. When you make your column editable, a Save action is automatically added to the table.
    9. Select this Save action and configure an event handler to trigger the query you created in the previous step when changes are saved.