# Kafka connect failed sink data to cratedb while the data doesn't exist in record

**URL:** <https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058>\
**Category:** CrateDB\
**Tags:** integration, sql\
**Created:** [August 4, 2025, 9:33am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058 "2025-08-04T09:33:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/jun_zhou/32/1079_2.png) [@Jun\_Zhou](https://community.cratedb.com/u/Jun_Zhou)\
**Post date:** [August 4, 2025, 9:33am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/1 "2025-08-04T09:33:32Z")

</div>

We’re using CrateDB 5.10.11, and using kafka connect sink data to it, after running for a while the connect encounter below error.

But the record don’t contain the value `08:11:26.000Z`, so I confused, how to locate the root cause, thanks in advance. For details about the error, please see the attachment.

```auto
aborted: ERROR: Cannot cast value 08:11:26.000Z to type timestamp without time zoneWhere: io.crate.exceptions.SQLExceptions.esToCrateException(SQLExceptions.java:211)io.crate.exceptions.SQLExceptions.prepareForClientTransmission(SQLExceptions.java:200)io.crate.protocols.postgres.Messages.sendErrorResponse(Messages.java:195)io.crate.protocols.postgres.Messages.sendErrorResponse(Messages.java:188)io.crate.protocols.postgres.PostgresWireProtocol.handleSync(PostgresWireProtocol.java:763)io.crate.protocols.postgres.PostgresWireProtocol$MessageHandler.dispatchMessage(PostgresWireProtocol.java:360)io.crate.protocols.postgres.PostgresWireProtocol$MessageHandler.dispatchState(PostgresWireProtocol.java:329)io.crate.protocols.postgres.PostgresWireProtocol$MessageHandler.channelRead0(PostgresWireProtocol.java:297)io.crate.protocols.postgres.PostgresWireProtocol$MessageHandler.channelRead0(PostgresWireProtocol.java:281)

```

[kafka\_connect\_crate.txt](https://community.cratedb.com/uploads/short-url/34p2P4d9Jo4y11oLe5XZUbsw96L.txt) (11.1 KB)

[table\_definition.txt](https://community.cratedb.com/uploads/short-url/h8VLX34elrNmwBJBreMO2PGHX8K.txt) (21.1 KB)

---

<div class="post-metadata">

**Author:** ![surister](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/surister/32/1087_2.png) [@surister](https://community.cratedb.com/u/surister)\
**Post date:** [August 4, 2025, 9:45am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/2 "2025-08-04T09:45:38Z")

</div>

Hi, in the `kafka_connect_crate.txt` I can see the value: `08:11:26.000Z`, it’s missing the date part of the timestamp.

With a ddl:

```sql
create table t ("somecol" TIMESTAMP WITH TIME ZONE)

```

This will fail:

```sql
insert into t values ('08:11:26.000Z') -- <- WRONG

```

But this will succeed

```sql
insert into t values ('1990-01-01T08:11:26.000Z')

```

---

<div class="post-metadata">

**Author:** ![Jun\_Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/jun_zhou/32/1079_2.png) [@Jun\_Zhou](https://community.cratedb.com/u/Jun_Zhou)\
**Post date:** [August 4, 2025, 9:49am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/3 "2025-08-04T09:49:52Z")

</div>

Hi @surister , I couldn’t find the value `08:11:26.000Z` in the INSERT SQL statement. I’m confused about where this value comes from.

---

<div class="post-metadata">

**Author:** ![surister](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/surister/32/1087_2.png) [@surister](https://community.cratedb.com/u/surister)\
**Post date:** [August 4, 2025, 9:54am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/4 "2025-08-04T09:54:54Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/crate/original/2X/1/1a44e0eaa6c84972b6452980ad21d8aecaba1cc1.png)

---

<div class="post-metadata">

**Author:** ![Jun\_Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/jun_zhou/32/1079_2.png) [@Jun\_Zhou](https://community.cratedb.com/u/Jun_Zhou)\
**Post date:** [August 4, 2025, 10:51am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/5 "2025-08-04T10:51:37Z")

</div>

Sorry for taking up your time, I should have caught such an obvious mistake. Thanks for pointing it out.

---

<div class="post-metadata">

**Author:** ![surister](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/surister/32/1087_2.png) [@surister](https://community.cratedb.com/u/surister)\
**Post date:** [August 4, 2025, 10:53am UTC](https://community.cratedb.com/t/kafka-connect-failed-sink-data-to-cratedb-while-the-data-doesnt-exist-in-record/2058/6 "2025-08-04T10:53:03Z")

</div>

Don’t worry about it! Sometimes we just need a fresh pair of eyes. Happy to be of assistance!!
