Reputation: 381
I have a String Set attribute i.e SS in a dynamodb table. I need to scan the database to check the value present in the any one list of the items.
Which comparison operator should I use for this scan?
example the db has items like this:
I need to search for a items containing a particular email say email1
alone not giving the entire tuple.
Upvotes: 1
Views: 592
Reputation: 7152
It seems like you are looking for the CONTAINS
operator of Scan
operation. It basically is the equivalent of in
in Python.
This said, if you need to perform this often, you probably should de-normalize your data to make it faster.
For example, you could build a second table like this:
hash_key
: namerange_key
: emailOf course, you would have to maintain this index yourself and query it manually.
Upvotes: 1