I would like to know if there is any pre built feature for geospatial query in AWS DynamoDB(similar to MongoDB). I have a Nodejs (AWS Lambda) based application which needs geo spatial queries. Can you guide me how i can enable geo spatial query in dynamo db and is there any sdk available for the same.
In Amazon DynamoDB, you can use either the DynamoDB API, or PartiQL, a SQL-compatible query language, to query an item from a table. With Amazon DynamoDB the Query action lets you retrieve data in a similar fashion. The Query action provides quick, efficient access to the physical locations where the data is stored.
What kind of query functionality does DynamoDB support? DynamoDB supports GET/PUT operations by using a user-defined primary key. The primary key is the only required attribute for items in a table. You specify the primary key when you create a table, and it uniquely identifies each item.
Querying is a very powerful operation in DynamoDB. It allows you to select multiple Items that have the same partition ("HASH") key but different sort ("RANGE") keys.
DynamoDB supports two types of read operations: Query and Scan. To find information, a query operation uses either the primary key or the index key. Scan, as the name implies, is a read call that scans the entire table for a specified result. DynamoDB is designed to be query-optimized.
It looks like you'd be interested in AWS's "Geo Library for Amazon DynamoDB", and you can read Jeff Barr's post about it, here. The official SDK is in Java, but there's an unofficial node port available on npm.
Depending on how complicated your queries might get, you might also want to take a look at the recent AWS Database Blog post on "Z-Order Indexing for Multifaceted Queries in Amazon DynamoDB".
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