Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I fetch all items from a DynamoDB table without specifying the primary key with java?

I'm fairly new to Amazon's AWS and its API for Java, so I'm not exactly sure what the most efficient method for what I'm trying to do would be. Basically, I'm trying to setup a database that will store a project's ID, it's status, as well as the bucket. What I'm having trouble with is getting a list of all user without primary key ?. Any recommendations?

like image 230
Devicedriver Avatar asked Jan 23 '15 06:01

Devicedriver


1 Answers

You can use the 'Scan' operation provided by DynamoDB. It does not need primary key to operate on. But keep in mind that scan operation is very inefficient and needs more read capacity. Read about Scan here on it's official doc.

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html

If you want to just retrieve all the entries, DynamoDB is probably not a acorrect choice for storing this data.

like image 190
RandomQuestion Avatar answered Oct 22 '22 11:10

RandomQuestion