I would appreciate help from anyone familiar with how DynamoDB work.
I need to perform scan on a large DynamoDB table. I know that DynamoDBClient scan operation is limited to 1 MB size of returned data. Does the same restriction apply to Table.scan operation? The thing is that Table.scan operation returns output of type "ItemCollection<ScanOutcome>
", while DynamoDBClient scan returns ScanResult output and it is not clear to me whether these operations work in a similar way or not.
I have checked this example: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ScanJavaDocumentAPI.html, but it doesn't contain any hints about using last returned key.
My questions are: Do I still need to make scan calls in a cycle until lastreturnedkey is null if I use Table.scan? If yes, how do I get last key? If not, how can I enforce pagination? Any links to code examples would be appreciated. I have spent some time googling for examples, but most of them are either using DynamoDBClient or DynamoDBMapper, while I need to use Table and Index objects instead.
Thanks!
Segments
and/orTotalSegments
; in that case the value ofLastEvaluatedKey
returned from the request must be used as theExclusiveStartKey
with the same segment ID in a subsequent scan operation. It's pretty much like SQL, but faster! – x80486