I have a table with a primary key and range key set:
user_id
timestamp_joined
Using the boto api layer, is there a way I can retrieve the item just by specifying the user_id (without the range key)? Every time I perform a getItem() query without specifying the range key it fails. I can only get it to work by specifying the range key (timestamp_joined).
The error message when fetching just by user_id is below:
boto.exception.DynamoDBResponseError: DynamoDBResponseError: 400 Bad Request
{'message': 'One or more parameter values were invalid: The provided
key size does ot match with that of the schema', '__type':
'com.amazon.coral.validate#ValidationException'}
It sounds like you want to perform a query. You can query the table specifying only the user_id (the hash key) and the query will return all items that match that user_id regardless of the range value.
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