[ 
https://issues.apache.org/jira/browse/BEAM-8410?focusedWorklogId=329889&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-329889
 ]

ASF GitHub Bot logged work on BEAM-8410:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Oct/19 14:01
            Start Date: 17/Oct/19 14:01
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on pull request #9808: 
[BEAM-8410] JdbcIO should support setConnectionInitSqls in its DataSource
URL: https://github.com/apache/beam/pull/9808#discussion_r336016007
 
 

 ##########
 File path: 
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
 ##########
 @@ -369,6 +375,23 @@ public DataSourceConfiguration withConnectionProperties(
       return builder().setConnectionProperties(connectionProperties).build();
     }
 
+    /**
+     * Sets the connection init sql statements to driver.connect(...).
+     *
+     * <p>NOTE - This property is not applicable across databases. MySql and 
mariadb support it.
+     */
+    public DataSourceConfiguration withConnectionInitSqls(Collection<String> 
connectionInitSqls) {
+      checkArgument(connectionInitSqls != null, "connectionInitSqls can not be 
null");
 
 Review comment:
   Don't we need also to check here that `connectionInitSqls` is not empty?
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 329889)
    Time Spent: 20m  (was: 10m)

> JdbcIO should support setConnectionInitSqls in its DataSource
> -------------------------------------------------------------
>
>                 Key: BEAM-8410
>                 URL: https://issues.apache.org/jira/browse/BEAM-8410
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-jdbc
>            Reporter: Cam Mach
>            Assignee: Cam Mach
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> This property, connectionInitSqls, is very handy for anyone who use MySql and 
> Mariadb, to set any init sql statements to be executed at connection time. 
> Note: but it's not applicable across databases



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to