DynamoDB Batch Update

前端 未结 6 681
[愿得一人]
[愿得一人] 2021-02-11 16:23

Is there any API in DynamoDB to update a batch of items? There is an API to write new items in batches (BatchWriteItem) and update single item using UpdateIte

相关标签:
6条回答
  • 2021-02-11 16:56

    I use DynamoDBMapper.batchSave(Iterable<? extends Object> objectsToSave) for this purpose.

    0 讨论(0)
  • 2021-02-11 16:59

    I know this is an old question by now, but DynamoDB recently added a Transaction api which supports update:

    Update — Initiates an UpdateItem operation to edit an existing item's attributes or add a new item to the table if it does not already exist. Use this action to add, delete, or update attributes on an existing item conditionally or without a condition.

    https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html

    0 讨论(0)
  • 2021-02-11 17:02

    No there is no batch update currently , you can use a single update Item call and have a workflow over it like AWS SWF or AWS step functions

    https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html

    0 讨论(0)
  • 2021-02-11 17:02

    BatchWriteItem cannot update items. To update items, use the UpdateItem action. BatchWriteItem operation puts or deletes multiple items in one or more tables

    Reference: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

    0 讨论(0)
  • 2021-02-11 17:12

    There is no batch update item API available in DynamoDB at the moment.

    DynamoDB API operations list

    0 讨论(0)
  • 2021-02-11 17:18

    I use a dynamoDB update trigger, then I made a template that said to me what items I should modify, I put them on a queue and them read queue messages in other to update one by one

    0 讨论(0)
提交回复
热议问题