I want to scan/query the dynamo DB table. Dynamo DB is case sensitive. I want to use Hash/ Range keys sometimes as strings. Is there any way we can enable case insensitivity in dynamo DB level ? Or is there any other solutions exist? I am querying the Dynamo with the JAVA SDK
The following are the naming rules for DynamoDB: All names must be encoded using UTF-8, and are case-sensitive. Table names and index names must be between 3 and 255 characters long, and can contain only the following characters: a-z.
DynamoDB supports two different types of read operations, which are query and scan. A query is a lookup based on either the primary key or an index key. A scan is, as the name indicates, a read call that scans the entire table in order to find a particular result.
Yes, like all the other database management systems, DynamoDB also supports all the conditional operators, User can specify a condition that is satisfied for a put, update, or delete operation to work on an item.
You now can use a SQL-compatible query language to query, insert, update, and delete table data in Amazon DynamoDB. You now can use PartiQL (a SQL-compatible query language)—in addition to already-available DynamoDB operations—to query, insert, update, and delete table data in Amazon DynamoDB.
There are 2 possible ways I can think of
1) Solve at the application end by tweaking the schema
e.g Let say you have "Name" as hash key now whenever new users are added you add them after making their name in lower-case
John --> john
Doe --> doe
Remember to store both the value (name
as hash for searching) and (displayName
for displaying purpose)
Now before querying the database, you can convert you search to lower-case.
2) Use ElasticSearch: DyanmoDB table can be integrated with ElasticSearch which can perform different search operations on your table (refer link)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With