Re: Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-11 Thread wangl...@geekplus.com.cn
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

Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-11 Thread Robin Moffatt
> 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 |

Re: Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-11 Thread wangl...@geekplus.com.cn
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

Re: Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-09 Thread Liam Clarke-Hutchinson
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:

Re: Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-09 Thread wangl...@geekplus.com.cn
-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

Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-09 Thread Liam Clarke-Hutchinson
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

Re: Write to database directly by referencing schema registry, no jdbc sink connector

2020-05-08 Thread Chris Toomey
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