ic4y commented on code in PR #3362:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3362#discussion_r1023562859


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/connection/SimpleJdbcConnectionProvider.java:
##########
@@ -121,24 +121,29 @@ public Connection getOrEstablishConnection()
         if (jdbcOptions.getPassword().isPresent()) {
             info.setProperty("password", jdbcOptions.getPassword().get());
         }
-        connection = driver.connect(jdbcOptions.getUrl(), info);
+        String jdbcOptionsUrl = jdbcOptions.getUrl();
+        connection = driver.connect(jdbcOptionsUrl, info);
         if (connection == null) {
             // Throw same exception as DriverManager.getConnection when no 
driver found to match
             // caller expectation.
             throw new SQLException(
-                "No suitable driver found for " + jdbcOptions.getUrl(), 
"08001");
+                "No suitable driver found for " + jdbcOptionsUrl, "08001");
         }
 
-        //Auto commit is used by default
-        connection.setAutoCommit(true);
-
+        // Auto commit is used by default, Teradata jdbc type fastload must be 
set false.
+        
connection.setAutoCommit(!(jdbcOptionsUrl.toLowerCase().contains("jdbc:teradata:")
 & jdbcOptionsUrl.toLowerCase().contains("type=fastload")));

Review Comment:
   Waiting for the #3451 pr to be merged, there is no need to modify it.



-- 
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]

Reply via email to