Example usage for com.amazonaws.services.dynamodbv2.model StreamRecord getKeys

List of usage examples for com.amazonaws.services.dynamodbv2.model StreamRecord getKeys

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.model StreamRecord getKeys.

Prototype


public java.util.Map<String, AttributeValue> getKeys() 

Source Link

Document

The primary key attribute(s) for the DynamoDB item that was modified.

Usage

From source file:dynamok.source.DynamoDbSourceTask.java

License:Apache License

private SourceRecord toSourceRecord(Map<String, String> sourcePartition, String topic,
        StreamRecord dynamoRecord) {
    return new SourceRecord(sourcePartition,
            Collections.singletonMap(Keys.SEQNUM, dynamoRecord.getSequenceNumber()), topic, null,
            RecordMapper.attributesSchema(), RecordMapper.toConnect(dynamoRecord.getKeys()),
            RecordMapper.attributesSchema(), RecordMapper.toConnect(dynamoRecord.getNewImage()),
            dynamoRecord.getApproximateCreationDateTime().getTime());
}