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?

posta un anno fa1960 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande