4

I using following query expression to get Campaign for a particular id

DynamoDBQueryExpression<Campaign> expression = new DynamoDBQueryExpression<Campaign>()
    .withKeyConditionExpression("#id = :val1")
    .withExpressionAttributeNames(expressionAttributeNames)
    .withExpressionAttributeValues(expressionAttributeValues);

PaginatedQueryList<Campaign> campaigns = dynamoDBMapper.query(Campaign.class, expression);

Let's say, i want to get Campaigns for list of ids. So instead of calling above query multiple time with different ids, can i just make one call to dynamodb with list of ids?

Gangaraju
  • 4,406
  • 9
  • 45
  • 77
mihir S
  • 617
  • 3
  • 8
  • 23
  • Check for BatchGetItems – Harshal Bulsara Jul 04 '17 at 04:31
  • Hi Harshal, thanks for the suggestion. After going through documentation, BatchGetItems can fulfill my usecase explained in the question. But as per the answer [here](https://stackoverflow.com/questions/30749560/whats-the-difference-between-batchgetitem-and-query-in-dynamodb) batchGetItem doesn't support filter expression and we will need filter for our future usecase – mihir S Jul 04 '17 at 06:52
  • Did you ever find an answer to this question? – Brooks Dec 15 '17 at 19:07

0 Answers0