Search code examples
pythonamazon-dynamodbbotosample

python dynamodb get 1000 entries


I am using amazon dynamodb and accessing it via the python boto query interface. I have a very simple requirement

  1. I want to get 1000 entries. But I don't know the primary keys beforehand. I just want to get 1000 entries. How can I do this? ...I know how to use the query_2 but that requires knowing primary keys beforehand.

  2. And maybe afterwards I want to get another different 1000 and go on like that. You can consider it as sampling without replacement.How can I do this?

Any help is much appreciated.


Solution

  • Use Table.scan(max_page_size=1000)