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 in AWS by Girija

edited Aug 5 by Kalgi 39 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
+3 votes
5 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
• 67,600 points
3,397 views
0 votes
1 answer
+1 vote
2 answers