使用Boto从dynamodb获取唯一的哈希键值列表 [英] Getting a list of unique hash key values from dynamodb using boto
本文介绍了使用Boto从dynamodb获取唯一的哈希键值列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想获取动态表的唯一哈希键值列表。我目前知道的唯一方法是扫描整个表,然后遍历扫描。有什么更好的方法?
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?
推荐答案
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.
这篇关于使用Boto从dynamodb获取唯一的哈希键值列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文