Re: Apache Flink - Using upsert JDBC sink for DataStream

2021-10-20 Thread M Singh
Thanks Jing for your references.  I will check them.  Mans On Monday, October 18, 2021, 11:24:13 PM EDT, JING ZHANG wrote: Hi Mans, Is there a DataStream api for using the upsert functionality ? You could try use `JdbcSink#sink` method, pass a upsert query as first parameter value. How

Re: Apache Flink - Using upsert JDBC sink for DataStream

2021-10-18 Thread JING ZHANG
Hi Mans, > > Is there a DataStream api for using the upsert functionality ? > You could try use `JdbcSink#sink` method, pass a upsert query as first parameter value. However, there is no standard syntax for upsert, you need to check whether the external database supports upsert or not. If yes, what

Re: Apache Flink - Using upsert JDBC sink for DataStream

2021-10-18 Thread M Singh
Hi Jing: Thanks for your response and example. Is there a DataStream api for using the upsert functionality ? Also, is there any reason for why the TableJdbcUpsertOutputFormat constructors are not public ?  Thanks again for your help. Mans On Monday, October 18, 2021, 12:30:36 AM EDT, JING ZH

Re: Apache Flink - Using upsert JDBC sink for DataStream

2021-10-17 Thread JING ZHANG
Hi, If you need JDBC upsert functionality, it's easier to implement app using Flink SQL. You could use JDBC Table Connector [1]. You could define primary key in DDL when writing data to external database. See CREATE TABLE DDL

Apache Flink - Using upsert JDBC sink for DataStream

2021-10-16 Thread M Singh
Hi Folks: I am working on Flink DataStream pipeline and would like to use JDBC upsert functionality.  I found a class TableJdbcUpsertOutputFormat but am not sure who to use it with the JdbcSink as shown in the document  (https://nightlies.apache.org/flink/flink-docs-master/api/java//org/apache/fl