jcustenborder / kafka-connect-transform-common

Common Transforms for Kafka Connect.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimeStamp Converter for column with NULL values

Dwijad opened this issue · 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