Dynamo扫描未能发现Unix时间记录。

0

【以下的问题经过翻译处理】 以下是参数:

let params = {
    TableName: SESSIONTABLE,
    ProjectionExpression: 
        "practitioner_full_name, appointment, utc_offset, start_time, start_time_unix, attendees, practitioner_email, id, practitioner_id, no_video_link, title, practitioner_title, service_text",
    FilterExpression:
        "(start_time_unix between :currentTime and :unixTimeAfteramin)",
    ExpressionAttributeValues: {
        ":currentTime": 1660297747000,
        ":unixTimeAfteramin" : 1660297807000,
    },
    };

start_time_unix 列的值为 1660297800000

start_time_unix 的值在 currentTimeunixTimeAfteramin 列的值之间。

不确定 dynamodb 出了什么问题。我在 python shell 中尝试了这三个值,结果很好。

Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1660297747000 < 1660297800000 < 1660297807000
True
>>> 

profile picture
전문가
질문됨 8달 전105회 조회
1개 답변
0

【以下的回答经过翻译处理】 您的表中有多少数据?当执行 Scan 请求时,它将仅返回前1MB的数据(在此处描述),如果其中没有任何项目与 FilterExpression 匹配,则将返回一个空响应。

为了扫描整个表,您需要实现分页,以便可以请求下一组价值1MB的数据。在此处描述。您还可以在各种语言中看到这些示例在我们的GitHub存储库中

AWS CLI默认分页,您可以尝试在那里运行您的请求,这将让您快速了解是否存在问题。

profile picture
전문가
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인