Skip to content

Commit b8868b2

Browse files
committed
Propagate timestamp to SourceRecord's
1 parent b7638d2 commit b8868b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/dynamok/source/DynamoDbSourceTask.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ public List<SourceRecord> poll() throws InterruptedException {
101101
}
102102

103103
private SourceRecord toSourceRecord(Map<String, String> sourcePartition, String topic, StreamRecord dynamoRecord) {
104-
// TODO also propagate timestamp via `dynamoRecord.getApproximateCreationDateTime.getTime` when that's exposed by Connect
105104
return new SourceRecord(
106105
sourcePartition,
107106
Collections.singletonMap(Keys.SEQNUM, dynamoRecord.getSequenceNumber()),
108-
topic,
107+
topic, null,
109108
RecordMapper.attributesSchema(), RecordMapper.toConnect(dynamoRecord.getKeys()),
110-
RecordMapper.attributesSchema(), RecordMapper.toConnect(dynamoRecord.getNewImage())
109+
RecordMapper.attributesSchema(), RecordMapper.toConnect(dynamoRecord.getNewImage()),
110+
dynamoRecord.getApproximateCreationDateTime().getTime()
111111
);
112112
}
113113

0 commit comments

Comments
 (0)