How to get data from tables using java code - amazon DynamoDB

+1 vote
public void listAllCourses(@QueryParam("author") String authorQuery) {
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Listing all courses.");
    }
    //List<Minilibrary> Minilibrary= new ArrayList<>();
    AmazonDynamoDB amazonDynamoDB = DynamoDbResource.createClient();
    Map<String, AttributeValue> expValues = new HashMap<>();
    expValues.put(":a", new AttributeValue(authorQuery));
    QueryRequest queryRequest = new QueryRequest(TABLE_NAME);
    // queryRequest.setKeyConditionExpression("author=:a");
    HashMap<String, Condition> keyConditions = new HashMap<String, Condition>();
    keyConditions.put("Id", new Condition().withComparisonOperator(ComparisonOperator.CONTAINS)
            .withAttributeValueList(new AttributeValue("Id = 5")));
    queryRequest.setKeyConditions(keyConditions);

}
Aug 3, 2019 in AWS by Girija

edited Aug 5, 2019 by Kalgi 1,937 views
Hey @Girija, Can you give some more details of what you're trying to do?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How to load data into a table in DynamoDB using Java?

You can create a .json file with the ...READ MORE

answered Feb 26, 2019 in AWS by Priyaj
• 58,020 points
6,954 views
+3 votes
6 answers

How to move files from amazon ec2 to s3 bucket using command line

Hey, 3 ways you can do this: To ...READ MORE

answered Oct 9, 2018 in AWS by Omkar
• 69,220 points
20,004 views
0 votes
1 answer
+1 vote
2 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP