Hi @Papadopoulos, Konstantinos
I think you can try something like this:
JDBCAppendTableSink sink = JDBCAppendTableSink.builder()
   .setDrivername("foo")
   .setDBUrl("bar")
   .setQuery("delete from %s where id = ?)")
   .setParameterTypes(FIELD_TYPES)
   .build();
Or you can build your own Sink code, where you can delete rows of DB table.

Best, JingsongLee


------------------------------------------------------------------
From:Papadopoulos, Konstantinos <konstantinos.papadopou...@iriworldwide.com>
Send Time:2019年5月28日(星期二) 22:54
To:Vasyl Bervetskyi <vb...@softserveinc.com>
Cc:user@flink.apache.org <user@flink.apache.org>
Subject:RE: Flink SQL: Execute DELETE queries

  
The case I have in mind was to have an external JDBC table sink and try to 
delete a number of or all rows of the target DB table. Is it possible using 
Flink SQL?
 
From: Vasyl Bervetskyi <vb...@softserveinc.com> 
Sent: Tuesday, May 28, 2019 5:36 PM
To: Papadopoulos, Konstantinos <konstantinos.papadopou...@iriworldwide.com>
Cc: user@flink.apache.org
Subject: RE: Flink SQL: Execute DELETE queries  
Hi Papadopoulos,
 
Unfortunately no, there is no DELETE or MODIFY queries, you should create new 
table as a result of query which will filter records from existing one  
 
From: Papadopoulos, Konstantinos <konstantinos.papadopou...@iriworldwide.com> 
Sent: Tuesday, May 28, 2019 5:25 PM
To: user@flink.apache.org
Subject: Flink SQL: Execute DELETE queries  
 
Hi all,
 
I experiment on Flink Table API & SQL and I have the following question; is 
there any way to execute DELETE queries using Flink SQL?
 
Thanks in advance,
Konstantinos  

Reply via email to