Closed banandh closed 9 months ago
I believe DynamoDB query provides what you're looking for. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.KeyConditionExpressions.html
In the query operation, you provide the partition key, and define the filter expression that matches the sort key.
Describe the feature
Dynamo DB Java SDK batchGetItemRequest to support sort key starts_with/begins_with format also.
Use Case
SIngle Table design patter for a person is designed to store address, name, emails, phones, ids as separate entities which means PersonId is the sortKey and each address of that person will be added with different sort keys.The same way emails, phones and all the other person related entities are stored in table.
In one of the scenario, I need to pull person's all email and phone alone based on person Id. I will just have the person ID (PK) and email, Phone's sort key format alone not the exact sort key. so how to fetch selective entities based on PK and SK starts with?? I could see options to fetch completely based on PK but it will fetch entire data or giving exact sort key and retrieving it.
Proposed Solution
No response
Other Information
No response
Acknowledgements
AWS Java SDK version used
2.20.55
JDK version used
JDK17
Operating System and version
Ubuntu