Complete scan of dynamoDb with boto3

前端 未结 8 1961
有刺的猬
有刺的猬 2020-11-29 04:08

My table is around 220mb with 250k records within it. I\'m trying to pull all of this data into python. I realize this needs to be a chunked batch process and looped throug

8条回答
  •  一整个雨季
    2020-11-29 04:47

    Turns out that Boto3 captures the "LastEvaluatedKey" as part of the returned response. This can be used as the start point for a scan:

    data= table.scan(
       ExclusiveStartKey=data['LastEvaluatedKey']
    )
    

    I plan on building a loop around this until the returned data is only the ExclusiveStartKey

提交回复
热议问题