Dynamo scan not finding records of time in unix.

0

Below are the params:

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,
    },
    };

This is the value of start_time_unix column - 1660297800000

The value of start_time_unix lies well within currentTime and unixTimeAfteramin column values.

Not sure what's wrong with dynamodb here. I tried the three values in python shell as well, it works good there.

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
>>> 
質問済み 2年前203ビュー
1回答
1
承認された回答

How much data is in your table? When you execute a Scan request, it will return only the first 1MB of data (described here) and if none of those items match the FilterExpression then you will be returned an empty response.

In order to scan the entire table, you will need to implement pagination so that you can request the next 1MB worth of data. Described here. You can also see examples of this in out GitHub Repo in various languages.

The AWS CLI paginates by default, you can try run your request there which will allow you to quickly understand if that is the issue.

profile pictureAWS
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン