[英]Issue in scanning dynamodb records with date filter using boto3
我有一個包含大量數據的 dynamodb 表。 我正在嘗試過濾creationDate
大於特定值的那些。 它返回值,但返回的數據總大小小於數據庫中實際存在的數據。
日期過濾器有什么問題嗎,或者我是否必須為日期過濾器提供任何特定格式,因為creationDate
存儲在數據庫中,格式為:“ 2022-03-25T02:29:12.591 ”
table = dynamodb.Table('table_log')
fe=Attr("creationDate").gte("2022-03-25")
response = table.scan(
FilterExpression=fe
)
data = response['Items']
while 'LastEvaluatedKey' in response:
response = table.scan(
FilterExpression=fe,
ExclusiveStartKey=response['LastEvaluatedKey']
)
data.extend(response['Items'])
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.