jcustenborder / kafka-connect-transform-common

Common Transforms for Kafka Connect.
Apache License 2.0
154 stars 59 forks source link

TimeStamp Converter for column with NULL values #79

Open Dwijad opened 3 years ago

Dwijad commented 3 years ago

I am running a Kafka connect source connector (Oracle) with transformation of human readable Date field[dd-MMM-yyyy HH:mm:ss] to Timestamp format[Long].

...
...
"transforms": "ConvertStartDate",
"transforms.ConvertStartDate.type": "org.apache.kafka.connect.transforms.TimestampConverter$Value",
"transforms.ConvertStartDate.target.type": "Timestamp",
"transforms.ConvertStartDate.field": "START_DATE",
"transforms.ConvertStartDate.format": "dd-MMM-yyyy HH:mm:ss"
...
...

This works fine except when the column [START_DATE] contains null value and the message does not get into the topic.

The issue is discussed in details here.

What is the fix for the issue?

Thanks