# TimeStamp Converter for column with NULL values

**URL:** <https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017>\
**Category:** Kafka Connect\
**Created:** [7 October 2021 10:33 UTC](https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017 "2021-10-07T10:33:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwija](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@dwija](https://forum.confluent.io/u/dwija)\
**Post date:** [7 October 2021 10:33 UTC](https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017/1 "2021-10-07T10:33:33Z")

</div>

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].

```auto
...
...
"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](https://issues.apache.org/jira/browse/KAFKA-7157).

What is the fix for the issue?

Thanks

---

<div class="post-metadata">

**Author:** ![danicafine](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/danicafine/32/2995_2.png) [@danicafine](https://forum.confluent.io/u/danicafine)\
**Post date:** [7 October 2021 21:57 UTC](https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017/2 "2021-10-07T21:57:57Z")

</div>

Two things to check:

1. Are you using one of the versions that has the NULL fix in it?

> - **Fix Version/s:** [1.0.3](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+1.0.3), [1.1.2](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+1.1.2), [2.0.2](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+2.0.2), [2.1.2](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+2.1.2), [2.2.2](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+2.2.2), [2.4.0](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+2.4.0), [2.3.1](https://issues.apache.org/jira/issues/?jql=project+%3D+KAFKA+AND+fixVersion+%3D+2.3.1)

1. Can you check the schema of the target topic, please? Specifically confirm that `START_DATE` allows for a NULL value.

---

<div class="post-metadata">

**Author:** ![dwija](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@dwija](https://forum.confluent.io/u/dwija)\
**Post date:** [8 October 2021 04:31 UTC](https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017/3 "2021-10-08T04:31:07Z")

</div>

Hi  
I am using Confluent CCS 6.1.0 which has Kafka version 2.7

It looks like the fix has not been applied to Kafka version 2.7 still now.

The schema has been designed to allow for NULL value.

![Selection_002](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/2X/2/25dd2a92414fdc436d7b0b6aaa6887896eae6035.png)

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [7 November 2021 04:31 UTC](https://forum.confluent.io/t/timestamp-converter-for-column-with-null-values/3017/4 "2021-11-07T04:31:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
