DynamoDB QueryRequest不返回所有结果
val queryReq: com.amazonaws.services.dynamodbv2.model.QueryRequest = new com.amazonaws.services.dynamodbv2.model.QueryRequest(tableName)
.withIndexName(...)
.addKeyConditionsEntry(..., new com.amazonaws.services.dynamodbv2.model.Condition()
.withAttributeValueList(Seq(new com.amazonaws.services.dynamodbv2.model.AttributeValue(...)):_*)
.withComparisonOperator(...))
.addKeyConditionsEntry(..., new com.amazonaws.services.dynamodbv2.model.Condition()
.withAttributeValueList(Seq(new com.amazonaws.services.dynamodbv2.model.AttributeValue().withN(...)):_*)
.withComparisonOperator(...))
.withScanIndexForward(scanDirection)
.withLimit(5000000)
此查询的limit = 5000000,但仅返回了大约3000个结果。 DynamoDB在每个查询中返回多少数据有限吗?如果是这样,是否有一种干净的方法来克服这一限制?
val queryReq: com.amazonaws.services.dynamodbv2.model.QueryRequest = new com.amazonaws.services.dynamodbv2.model.QueryRequest(tableName)
.withIndexName(...)
.addKeyConditionsEntry(..., new com.amazonaws.services.dynamodbv2.model.Condition()
.withAttributeValueList(Seq(new com.amazonaws.services.dynamodbv2.model.AttributeValue(...)):_*)
.withComparisonOperator(...))
.addKeyConditionsEntry(..., new com.amazonaws.services.dynamodbv2.model.Condition()
.withAttributeValueList(Seq(new com.amazonaws.services.dynamodbv2.model.AttributeValue().withN(...)):_*)
.withComparisonOperator(...))
.withScanIndexForward(scanDirection)
.withLimit(5000000)
This query is having withLimit = 5000000, but only returned about 3000 results. Is there a limit in how much data being returned by dynamodb in each query? If so, is there a clean way to overcome this limit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚找到解决方案。所以我会回答自己的问题:
当GetLastEvaLeDKey()不是空或空的时,我可以创建一个附加结果集的wir循环。
I just found the solution. So I will answer my own question:
I can just create a while loop that appends to the result set when getLastEvaluatedKey() is not null nor empty.