I am trying to query a dynamodb table. When I'm using the begins with operator I'm getting the following error.
{u'Message': u'All queries must have a condition on the hash key, and it must be of type EQ', u'__type': u'com.amazon.coral.validate#ValidationException'}
result_set = tb_places.query_2(
place_name__beginswith="ame",
)
Here place_name
is a Global Secondary Index
place_name
is thehash_key
, a query won't work like this. You also didn't specify the index name (index='DateJoinedIndex'
) – mkobit