0
votes

I am trying to perform batch get operation on DynamoDB using DynamoDBMapper.batchLoad() on a Table having composite primary key where I know the set of HashKey values but not the RangeKey value. Regarding RangeKey Value only information I only know character sequence with which they start with like if sequence says "test" then RangeKey value will be something like "test1243". To solve this problem dynamodb support begins_with caluse but on query operation. How can I use the same begins_with clasue in BatchGet Operation.

1

1 Answers

0
votes

You can only use the begins_with operator with queries. When you call GetItem or BatchGetItem you must specify the whole primary key (partition key + sort key if present) of the items you wish to retrieve so the begins_with operator is not useful.

You should just run queries in parallel, one for each of the hash keys you need to get the records for.