use of software.amazon.awssdk.services.dynamodb.model.PutRequest in project beam by apache.
the class DynamoDBIOIT method buildWriteRequest.
private static KV<String, WriteRequest> buildWriteRequest(TestRow row) {
AttributeValue id = AttributeValue.builder().n(row.id().toString()).build();
AttributeValue name = AttributeValue.builder().s(row.name()).build();
PutRequest req = PutRequest.builder().item(ImmutableMap.of(COL_ID, id, COL_NAME, name)).build();
return KV.of(env.options().getDynamoDBTable(), WriteRequest.builder().putRequest(req).build());
}
Aggregations