====================== Insert timestamp field ====================== The following example will insert a field `timestamp` into the value of the record. .. code-block:: json :caption: Configuration { "transforms" : "timestampNowField", "transforms.timestampNowField.type" : "com.github.jcustenborder.kafka.connect.transform.common.TimestampNowField$Value", "transforms.timestampNowField.fields" : "timestamp" } .. code-block:: json :caption: Input { "topic" : "testing", "kafkaPartition" : 1, "valueSchema" : { "type" : "STRUCT", "isOptional" : false, "fieldSchemas" : { "firstName" : { "type" : "STRING", "isOptional" : true }, "lastName" : { "type" : "STRING", "isOptional" : true } } }, "value" : { "schema" : { "type" : "STRUCT", "isOptional" : false, "fieldSchemas" : { "firstName" : { "type" : "STRING", "isOptional" : true }, "lastName" : { "type" : "STRING", "isOptional" : true } } }, "fieldValues" : [ { "name" : "firstName", "schema" : { "type" : "STRING", "isOptional" : true }, "storage" : "example" }, { "name" : "lastName", "schema" : { "type" : "STRING", "isOptional" : true }, "storage" : "user" } ] }, "timestamp" : 123412351, "timestampType" : "NO_TIMESTAMP_TYPE", "offset" : 12345, "headers" : [ ] } Change(s) in the output are emphasized if delta(s) are detected. .. code-block:: json :caption: Output :emphasize-lines: 15, 16, 17, 18, 19, 20, 36, 37, 38, 39, 40, 41, 59, 60, 61, 62, 63, 64, 65, 66, 67 { "topic" : "testing", "kafkaPartition" : 1, "valueSchema" : { "type" : "STRUCT", "isOptional" : false, "fieldSchemas" : { "firstName" : { "type" : "STRING", "isOptional" : true }, "lastName" : { "type" : "STRING", "isOptional" : true }, "timestamp" : { "name" : "org.apache.kafka.connect.data.Timestamp", "type" : "INT64", "version" : 1, "isOptional" : false } } }, "value" : { "schema" : { "type" : "STRUCT", "isOptional" : false, "fieldSchemas" : { "firstName" : { "type" : "STRING", "isOptional" : true }, "lastName" : { "type" : "STRING", "isOptional" : true }, "timestamp" : { "name" : "org.apache.kafka.connect.data.Timestamp", "type" : "INT64", "version" : 1, "isOptional" : false } } }, "fieldValues" : [ { "name" : "firstName", "schema" : { "type" : "STRING", "isOptional" : true }, "storage" : "example" }, { "name" : "lastName", "schema" : { "type" : "STRING", "isOptional" : true }, "storage" : "user" }, { "name" : "timestamp", "schema" : { "name" : "org.apache.kafka.connect.data.Timestamp", "type" : "INT64", "version" : 1, "isOptional" : false }, "storage" : 1665683591820 } ] }, "timestamp" : 123412351, "timestampType" : "NO_TIMESTAMP_TYPE", "offset" : 12345, "headers" : [ ] }