Getting a list of unique hash key values ​​from dynamodb using boto

I want to get a list of unique hash key values ​​for a dynamodb table. The only way I know to do at this time is to scan the entire table and then iterate over it for scanning. What is the best way?

+5
source share
1 answer
rs = list(table.scan(range__eq="rangevalue")) for i in rs: print i['primarykey'] 

gotta do the trick. I would love to hear cheaper ways to do the same.

+1
source

Source: https://habr.com/ru/post/1200896/


All Articles