Kafka Timestamp Transforms

Hello,

I have noticed a weird behaviour with the timestamp transform (org.apache.kafka.connect.transforms.TimestampConverter$Value) while using the JDBC sink connector. We have some date column being read from spanner, and is stored to the kafka topic as a string in this format:

“created_on”: {
“string”: “2024-07-29T01:18:07.845031299Z”
},

We then apply the transform to this field, to write to a Mysql DB as the target, as captured below:

“”"
transforms.convertcreated.type=org.apache.kafka.connect.transforms.TimestampConverter$Value
transforms.convertcreated.field=created_on
transforms.convertcreated.format=yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
transforms.convertcreated.target.type=Timestamp
“”"

When the data does get written, it shows up as a future date: 2024-08-07T20:01:58

We are having difficulties understanding what the issue is. Furthermore, even if we change the column to a string type, and also change the transform’s target.type to a string, it still returns the wrong date: 2024-08-07T20:01:58.299Z.

The only time we have no issues is when we do not apply a transform, but set the DB column to a string type.

Any help would be greatly appreciated.