DynamoDB-仅当存在分区密钥和范围密钥时,批处理更新才

发布于 2025-02-09 23:35:44 字数 225 浏览 2 评论 0原文

我有一个用例,在DynamoDB表中,我必须批量批量更新一个条件“分区密钥”和“范围密钥”的项目。 如果它们不存在,我不必更新该项目。

我当前的字段是 - PartitionKeyfield,Rangkeyfield,FieldForupDate,RandomKey1,RandomKey2。

“可以使用updateEtem的条件表达,但是在batchupdate中是否有类似的方法?

我知道

I have a use case where I have to batch update a certain number of items in DynamoDB Table with the condition "Partition Key" and "Range Key" exists.
If they do not exists, I do not have to update the item.

My current fields are - partitionkeyfield, rangekeyfield, fieldForUpdate, Randomkey1, RandomKey2.

I know that "ConditionExpression can be employed for UpdateItem but is there a similar approach for this in BatchUpdate?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彼岸花ソ最美的依靠 2025-02-16 23:35:44

PartiQl batchexecutestatement允许有条件的多个项目写作。常规API不允许有条件的批次写入

The partiQL batchExecuteStatement allows conditional writes of multiple items. The regular API does not allow conditional batch writes

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文