lonelyGhostisdog commented on code in PR #1791:
URL:
https://github.com/apache/incubator-seatunnel/pull/1791#discussion_r865509344
##########
seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-jdbc/src/main/java/org/apache/seatunnel/flink/jdbc/sink/JdbcSink.java:
##########
@@ -151,4 +178,56 @@ public void outputBatch(FlinkEnvironment env, DataSet<Row>
dataSet) {
.finish();
dataSet.output(format);
}
+
+ @Override
+ public void close() throws Exception {
+ executePostSql();
+ }
+
+ private void executePreSql() {
+ if (!StringUtils.isNotBlank(preSql)) {
+ LOGGER.info("Starting to execute pre sql: \n {}", preSql);
+ try {
+ executeSql(preSql);
+ } catch (SQLException e) {
+ LOGGER.info("Execute pre sql failed", e);
Review Comment:
hi @legendtkl , thank for your reivew , it's my bad, i will change them soon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]