Easiest Way to Create DynamoDB Queries
What if you could create DynamoDB queries without any prior knowledge of DynamoDB query syntax? With Dynobase, you can. Stop guessing the syntax and start delivering business value. Dynobase is a professional GUI editor for DynamoDB which generates data-layer interaction code for you.
Using Dynobase visual query builder, specify what data you'd like to fetch
Execute the query, click 'Copy As' and select language of your choice.
Navigate to your editor and simply paste the generated code. Viola!
Working with DynamoDB Queries
Query is the DynamoDB operation to fetch data which probably you're going to use the most. It's meant to fetch a set of records (up to 1MB) from one partition identified by 'Partition Key'. It's faster than Scan because it does a direct lookup to the desired partition and unlike 'Get', Query returns a collection of items. Dynobase with its query builder makes building them easier and exportable.
Frequently Asked Questions
Which languages can I export DynamoDB query code for?
Currently Dynobase supports two languages/SDKs: Node.js and Python/Boto. We'll be adding Java, Golang and CLI formats soon.
What is the query latency/speed in DynamoDB?
There are multiple factors that contribute to this question, but it is safe to say that generally speaking, DynamoDB returns data in the 10ms–20ms range for eventually consistent reads. For strongly consistent reads, that number is a bit bigger.
If data returned from Query is limited to 1MB and I have more data associated with that partition key, how can I get that?
Use Pagination. In the presented scenario, Query operation should return 'LastEvaluatedKey' alongside 'Items'. To get the next 'Page' of data, issue a Query request once again but this time with 'ExclusiveStartKey' parameter with the value of returned 'LastEvaluatedKey'
Can we query DynamoDB without the partition key?
No. If you want to fetch data from DynamoDB without Partition Key, use Scan operation.
Why do DynamoDB query and scan return different results?
There's a fundamental difference between how Query and Scan work. While Query fetches data identified by one partition key, Scan goes linearly through the whole table and all the partitions. While it is tempting to use Scan operations because of more flexibility, usage of Scan is a sign of bad data design. Most well-architected applications do not use scan operations at all.
How can I make DynamoDB query faster? Why is my DynamoDB query slow?
If you're already using Query to fetch data and since DynamoDB is fully managed, you can't do much. The only thing you can do is to reduce the amount of data transferred and parsed by your application. You can achieve that by narrowing down the results using Filter Expressions and AttributesToGet parameters.
© 2020 Dynobase