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?

preguntada hace un año1963 visualizaciones
1 Respuesta
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
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas