JDBC sink connector does not supports UUID type in postgres

Hey guys,
I have column in Postgresql table with data type UUID.
Currently JDBC sink connector (neither ksqldb) does not supports UUID type .and hence my sink connector fails.
Is there a solution for this ?

My implementation is as follows…
there is debezium sql server source connector that push data to kafka topic, do some transformations in KSQLDB, sink connector takes reads messages from the KSQL table and tries to push to POstgres

hey @PitsBee

afaik Debezium connector for PostgreSQL should map UUID to string.
Might helpful depending on your use case.


Hi @mmuehlbeyer,

But how Debezium Source connector can help with fixing JDBC Sink connector pointing at Postgres? :slight_smile:

Or is there some built-in SMT from Debezium stack which can handle that?

hi @whatsupbros

you’re right :slight_smile:

if my understanding is correct debezium should handle it yes

Yes, Debezium should be able to process UUIDs to put them into a Kakfa topic without issues.

But this is probably won’t help anyway when you have to put Kafka data to a Postgres table where some columns are defined as UUID (which is the original issue of the topic starter).

The only workaround which comes to my mind is to use some “intermediate” staging table with text columns instead of UUIDs, and then to fill the final target table using i.e. a trigger or a batch processing job inside the database.

Maybe with a custom query one would be able to specify all the needed data type conversions, but JDBC Sink doesn’t support custom queries, only the JDBC Source has query configuration property, if I’m not mistaken.

ah you’re pretty right
mixed it up respectively didn’t honour the “sink connector” :expressionless:

yes you’re right

something like this might be helpful

1 Like