You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "Papadopoulos, Konstantinos" <Ko...@IRIworldwide.com> on 2019/05/28 14:25:15 UTC
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
Re: Flink SQL: Execute DELETE queries
Posted by JingsongLee <lz...@aliyun.com>.
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 <Ko...@IRIworldwide.com>
Send Time:2019年5月28日(星期二) 22:54
To:Vasyl Bervetskyi <vb...@softserveinc.com>
Cc:user@flink.apache.org <us...@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 <Ko...@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 <Ko...@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
RE: Flink SQL: Execute DELETE queries
Posted by "Papadopoulos, Konstantinos" <Ko...@IRIworldwide.com>.
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 <Ko...@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 <Ko...@IRIworldwide.com>>
Sent: Tuesday, May 28, 2019 5:25 PM
To: user@flink.apache.org<ma...@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
RE: Flink SQL: Execute DELETE queries
Posted by Vasyl Bervetskyi <vb...@softserveinc.com>.
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 <Ko...@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