File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
streamingpro-core/src/main/java/streaming/core/datasource Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11package streaming .core .datasource
22
33import java .sql .ResultSet
4-
54import org .apache .spark .sql .mlsql .session .MLSQLException
65
6+ import java .util .Properties
77import scala .collection .mutable
88import scala .collection .mutable .ArrayBuffer
99
@@ -38,7 +38,13 @@ object JDBCUtils {
3838 val driver = options(" driver" )
3939 val url = options(" url" )
4040 Class .forName(driver)
41- val connection = java.sql.DriverManager .getConnection(url, options(" user" ), options(" password" ))
41+
42+ val infos = new Properties ()
43+ options.foreach(item => {
44+ infos.put(item._1, item._2)
45+ })
46+ val connection = java.sql.DriverManager .getConnection(url, infos)
47+
4248 try {
4349 options.get(" driver-statement-query" ).map { sql =>
4450 val stat = connection.prepareStatement(sql)
You can’t perform that action at this time.
0 commit comments