ricRecord value = record.value();
change the GenericRecord to sinkRecord
task.put(Arrays.asList(sinkRecord));
}
}
Thanks,
Lei
wangl...@geekplus.com.cn
From: Robin Moffatt
Date: 2020-05-11 16:40
To: users
Subject: Re: Write to database directly by referencing schema re
> wirite to target database. I want to use self-written java code
instead of kafka jdbc sink connector.
Out of interest, why do you want to do this? Why not use the JDBC sink
connector (or a fork of it if you need to amend its functionality)?
--
Robin Moffatt | Senior Developer Advocate |
nect-jdbc/sink-connector/index.html)
> can achieve this function.
>
> But i have no idea how to write with java code.
> Is there any code example to achieve this?
>
> Thanks,
> Lei
>
>
>
> wangl...@geekplus.com.cn
>
>
> From: Liam Clarke-Hutchinson
> Date: 2
eve this function.
>
> But i have no idea how to write with java code.
> Is there any code example to achieve this?
>
> Thanks,
> Lei
>
>
>
> wangl...@geekplus.com.cn
>
>
> From: Liam Clarke-Hutchinson
> Date: 2020-05-09 16:30
> To: users
> Subject:
-Hutchinson
Date: 2020-05-09 16:30
To: users
Subject: Re: Write to database directly by referencing schema registry, no jdbc
sink connector
Hi Lei,
You could use the Kafka Avro consumer to deserialise records using the
Schema Registry automatically.
Then write to the DB as you see fit.
Cheers
Hi Lei,
You could use the Kafka Avro consumer to deserialise records using the
Schema Registry automatically.
Then write to the DB as you see fit.
Cheers,
Liam Clarke-Hutchinson
On Sat, 9 May 2020, 2:38 pm wangl...@geekplus.com.cn, <
wangl...@geekplus.com.cn> wrote:
>
> Using debezium to pars
Write your own implementation of the JDBC sink connector and use the avro
serializer to convert the kafka record into a connect record that your
connector takes and writes to DB via JDBC.
On Fri, May 8, 2020 at 7:38 PM wangl...@geekplus.com.cn <
wangl...@geekplus.com.cn> wrote:
>
> Using debeziu