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?

demandé il y a un an1963 vues
1 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions