![]() |
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. You can use Amazon DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic. Amazon DynamoDB automatically spreads the data and traffic for the table over a sufficient number of servers to handle the request capacity specified by the customer and the amount of data stored, while maintaining consistent and fast performance. Please refer to this article before diving into Scan Operation in DynamoDB – DynamoDB Introduction Scan OperationScan operation in Amazon DynamoDB reads every item in a table or a secondary index. By default, a Scan operation returns all of the data attributes for every item in the table or index. Scan always returns a result set. If no matching items are found, the result set is empty. A single Scan request can retrieve a maximum of 1 MB of data. To do the scan operation from the AWS Management Console, Follow the below steps:
Let’s dive into the small example. I have the table named test-table which have the following items. ![]() Table items If I want to do the scan operation to get all attributes from the table, Then ![]() Items returned after doing scan operation But If you want specific attributes, then select them from specific projection. Here I am selecting only fname and lname, so only two attributes are returned. The following code snippet in python will return all the Attributes. Python3
The following code snippet will only return the specified attributes. Python3
This is how we can do Scan operation with Console and Code. Scan Operation on DynamoDB – FAQ’sCan I limit the number of items returned in a Scan operation?
Does Scan operation read all the attributes of an item?
When should I use Scan in DynamoDB?
What is the difference between Scan and Query in DynamoDB?
|
Reffered: https://www.geeksforgeeks.org
Amazon Web Services |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |