Search in sources :

Example 1 with PutRequest

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());
}
Also used : AttributeValue(software.amazon.awssdk.services.dynamodb.model.AttributeValue) PutRequest(software.amazon.awssdk.services.dynamodb.model.PutRequest)

Aggregations

AttributeValue (software.amazon.awssdk.services.dynamodb.model.AttributeValue)1 PutRequest (software.amazon.awssdk.services.dynamodb.model.PutRequest)1