kikicoder
kikicoder

Reputation: 421

configure kafka jdbc source connector

I am dealing with kafka from a spring boot app when I produce a message using kafkatemplate and with the use of avro scheme the produced message is something like:

"{\"kkk\":{\"string\":\"somevalue\" ....}

but when I use the kafka connect jdbc source connector I am getting something like this:

"{\"kkk\":\"somevalue\" ...

my question is how to make the jdbc connector produce the same format as the kafkaTemple

Upvotes: 0

Views: 247

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191914

The first output shown is Avro JSON encoding. You cannot remove the string type unless you make the field a required non-nullable, and non-union type

So, seems the JDBC source has inferred the schema of that column to not have nulls, and the column is always a varchar type.

Upvotes: 0

Related Questions