kafka-connect-transform-common icon indicating copy to clipboard operation
kafka-connect-transform-common copied to clipboard

TimeStamp Converter for column with NULL values

Open Dwijad opened this issue 4 years ago • 0 comments

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

Dwijad avatar Oct 07 '21 10:10 Dwijad