Posts

Showing posts with the label dynamodb-queries

DynamoDB and Boto3 error on BatchGetItem operation: “The provided key element does not match the schema”

Image
Clash Royale CLAN TAG #URR8PPP DynamoDB and Boto3 error on BatchGetItem operation: “The provided key element does not match the schema” I am having difficulty with the Boto3/DynamoDB BatchGetItem operation. I would greatly appreciate any help or guidance! I'm pretty new to python/aws so sorry in advanced if this is a novice question. When I perform the operation, I get this error: botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the BatchGetItem operation: The provided key element does not match the schema Here is my code: import boto3 dynamodb = boto3.resource('dynamodb', region_name='us-west-2') response = dynamodb.batch_get_item( RequestItems={ 'test': { 'Keys': [ { 'item_ID': { 'S': '1' } }, { 'item_ID': { ...

How to find distance between already saved lat and long and user current lat long in dynamodb aws?

Image
Clash Royale CLAN TAG #URR8PPP How to find distance between already saved lat and long and user current lat long in dynamodb aws? I already have table called location that contains lat and long of hotel and the details, i need query to find the distance between user current location and already saved hotel lat long if less than 25kms show result in dynamoDb, Am new to dynamoDb already i done this with mysql find distance and having used to make that 25kms condition, Thanks in advance. i struggling with this 2 days. 1 Answer 1 No such function exists in DynamoDB. You would need to do the math to calculate the distance between the 2 coordinates yourself By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these pol...