BatchGetResultPageIterable batchResults = dynamoDbEnhancedClient
.batchGetItem(BatchGetItemEnhancedRequest.builder()
.readBatches(ReadBatch.builder(Analysis.class).mappedTableResource(analysisTable)
.addGetItem(GetItemEnhancedRequest.builder()
.key(Key.builder().partitionValue(projectId).build()).build())
.build())
.build());
batchResults.forEach(page -> page.resultsForTable(analysisTable)
.forEach(item -> System.out.println(item.getFileId())));
I used the above one.. but i am facing the issue software.amazon.awssdk.services.dynamodb.model.DynamoDbException: The provided key element does not match the schema (Service: DynamoDb, Status Code: 400, Request ID: 36V6D9GAGEUA817ODOGV52PF6VVV4KQNAO5AEMVJF66Q9ASUAAJG)
AnalysisTable
=================
PartitionKey Sort Key Name
A===============>1.txt=====>ABC
A===============>2.txt=====>DEF
A===============>3.txt=====>GHI
A===============>4.txt=====>JKL
class Analysis {
private String projectId;
private String sampleId;
private String sampleName;
private String description;
//setter & getters
}