I want to get a list of unique hash key values for a dynamodb table. The only way that I know to do it currently is to scan the entire table and then iterate over the scan. What is the better way?
我想获得一个dynamodb表的唯一哈希键值列表。目前我所知道的唯一方法是扫描整个表格然后迭代扫描。有什么更好的方法?
1 个解决方案
#1
1
rs = list(table.scan(range__eq="rangevalue"))
for i in rs:
print i['primarykey']
should do the trick. I'd love to hear cheaper ways to do the same thing.
应该做的伎俩。我希望听到更便宜的方法来做同样的事情。
#1
1
rs = list(table.scan(range__eq="rangevalue"))
for i in rs:
print i['primarykey']
should do the trick. I'd love to hear cheaper ways to do the same thing.
应该做的伎俩。我希望听到更便宜的方法来做同样的事情。