Dynamodb Sort Key ENDS_WITH (KeyConditions - ComparisonOperator)

0

I want to be able to query my dynamoDb table using sort key ends_with operator, this is not possible currently since we only have "EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN" comparison operators. Why is this not possible currently and will it be available in the near future?

gefragt vor einem Jahr1959 Aufrufe
1 Antwort
0

If your use-case involves quickly finding objects based on their suffix in a specific field, consider extracting this suffix (assuming it's a fixed-size suffix) as another field and have a secondary index on that one. If you want to query arbitrary length suffixes, I would create a lookup table and update it with possible suffixes (or some of them, to save some calls, and then filter when querying).

Or you would need to use CONTAINS and then check your results

profile pictureAWS
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen