[ https://issues.apache.org/jira/browse/FLINK-10315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625014#comment-16625014 ]
vinoyang commented on FLINK-10315: ---------------------------------- Hi [~flacombe] , I think there are a few questions about your suggestion: 1) If you add the setConnection() method to the builder, the life cycle of the Connection will be uncontrollable, and the open/close of the OutputFormat interface is more reasonable to manage the creation and destruction of the db connection; 2) The connection should not be initialized when the program is built, because it will be used when it is actually executed on the TM. It makes no sense to establish a connection in advance, and it cannot be serialized and passed to the real TM. What do you think? > Let JDBCAppendTableSink be built with java.sql.Connection > --------------------------------------------------------- > > Key: FLINK-10315 > URL: https://issues.apache.org/jira/browse/FLINK-10315 > Project: Flink > Issue Type: Improvement > Components: Java API > Environment: I'm currently using Flink 1.6.0 Java. > Reporter: François Lacombe > Assignee: vinoyang > Priority: Major > > Currently, JDBCAppendTableSink is built with methods like setDBUrl, > setUsername, setPassword... and so on. > We can't use an existing Java SQL connection to build it. > It may be great to add a setConnection() method to the builder class as to > prevent sensitive data like username or password to transit through large > stacks from config connectors (often in main()) to JDBC sinks. > To be able to provide only one object is far lighter than 4 or 5 strings > > Thanks in advance -- This message was sent by Atlassian JIRA (v7.6.3#76005)