We kicked off this series by seeing on day 1 how to use InsertField to add in the timestamp to a message passing through the Kafka Connect sink connector. Today we’ll see how to use the same Single Message Transform to add in a static field value, as well as the name of the Kafka topic, partition, and offset from which the message has been read.
" transforms " : " insertStaticField1 " ,
" transforms.insertStaticField1.type " : " org.apache.kafka.connect.transforms.InsertField$Value " ,
" transforms.insertStaticField1.static.field " : " sourceSystem " ,
" transforms.insertStaticField1.static.value " : " NeverGonna "
Read more: 🎄 Twelve Days of SMT 🎄 - Day 6: InsertField II