vogels icon indicating copy to clipboard operation
vogels copied to clipboard

Add support for batch deletes

Open JoshZA opened this issue 9 years ago • 1 comments

This would be super handy

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

JoshZA avatar Oct 29 '15 19:10 JoshZA

Here is a part of the code I use for BatchWrite PutRequest using vogel Model and its validation: https://gist.github.com/Incubatio/7c56d90897fff9ff0eb4

Just replace PutRequest by DeleteRequest and you have your batch delete.

Note that batchWrite support only 25 item at a time, so you might want to create chunk (with _.chunk for instance) Another note, when you have huge amount of data, you might want to use waterfall or series to avoid too many concurrent threads.

Incubatio avatar Oct 31 '15 12:10 Incubatio