简体   繁体   English

如何获得表的所有数据并在条件dynamodb下应用

[英]How to get all data of table and apply if condition dynamodb

I am looking into this documentation http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html 我正在研究此文档http://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html

there is get_item function to get a specific element but I want to get all data of this table . get_item函数获取特定的元素,但我想获取该表的所有数据。 Is there any way to get all table data ? 有没有办法获取所有表数据? And there is no way mention to get data on basis of If condition as well ? 并且也没有提到是否也要基于If条件获取数据?

PS I am new in dynamodb any help would be highly appreciated . PS我在dynamodb中是新手,将不胜感激。 thanks 谢谢

The operation that you need is the scan operation. 您需要的操作是扫描操作。

As per the name, the operation Scans the entire table and return the results in chunks of 1MB. 按照名称,该操作将扫描整个表,并以1MB的块为单位返回结果。 In this situation it also returns a LastEvaluatedKey info. 在这种情况下,它还会返回LastEvaluatedKey信息。 That info permits you to start a new scan from this point on to get another 1MB... 该信息允许您从这一点开始进行新的扫描,以获得另外的1MB ...

Just keep in mind that this operation has a high cost in terms of performance and read troughput! 请记住,此操作在性能和读取量方面会付出很高的代价!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM