we need create custom last evaluated key
The use case goes Here:
First scan table its having ten records,the tenth record should my last evaluated key when i do second time scan operation
Thanks in advance
we need create custom last evaluated key
The use case goes Here:
First scan table its having ten records,the tenth record should my last evaluated key when i do second time scan operation
Thanks in advance
#Exclusive start key should be null for your first page
esk = None
#Get the first page
scan_generator = MyTable.scan(Limit=10, exclusive_start_key=esk)
#Get the key for the next page
esk = scan_generator.kwargs['exclusive_start_key'].values()
#Now get page 2
scan_generator = MyTable.scan(Limit=10, exclusive_start_key=esk)
EDIT:
exclusive_start_key (list or tuple) – Primary key of the item from which to continue an earlier query. This would be provided as the LastEvaluatedKey in that query.
For example
exclusive_start_key = ('myhashkey');
or
exclusive_start_key = ('myhashkey', 'myrangekey');