Replies: 1 comment
-
So keys in It'd look something like this (based on your sample code): for (GetScoopService.GeneratedKeys key: keys) {
listOfKeys.add(Map.of("pk", new AttributeValue(getPartitionKey(key))));
}
requestItem.put(tableName, new KeysAndAttributes().withKeys(listOfKeys));
batchGetItemRequest.setRequestItems(requestItem); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using below option
BatchGetItemSpec batchGetItemSpec = new BatchGetItemSpec();
BatchGetItemRequest batchGetItemRequest = new BatchGetItemRequest();
QuerySpec querySpec = new QuerySpec();
But here " attributeValueMap.put("pk",new AttributeValue(getPartitionKey(key)));" I m adding this in map so its overriding everything one single item is requested. I need to reqeust a single table against a PK for different PK values in batch query. PLease share some java samples
Beta Was this translation helpful? Give feedback.
All reactions