File tree 1 file changed +6
-0
lines changed
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 46
46
import java .util .Arrays ;
47
47
import java .util .HashSet ;
48
48
import java .util .Optional ;
49
+ import java .util .Properties ;
49
50
import java .util .Set ;
50
51
import java .util .stream .Collectors ;
51
52
import java .util .stream .Stream ;
71
72
import static org .apache .flink .connector .jdbc .table .JdbcConnectorOptions .TABLE_NAME ;
72
73
import static org .apache .flink .connector .jdbc .table .JdbcConnectorOptions .URL ;
73
74
import static org .apache .flink .connector .jdbc .table .JdbcConnectorOptions .USERNAME ;
75
+ import static org .apache .flink .connector .jdbc .utils .JdbcUtils .getConnectionProperties ;
74
76
75
77
/**
76
78
* Factory for creating configured instances of {@link JdbcDynamicTableSource} and {@link
@@ -153,6 +155,10 @@ private InternalJdbcConnectionOptions getJdbcOptions(
153
155
readableConfig .getOptional (USERNAME ).ifPresent (builder ::setUsername );
154
156
readableConfig .getOptional (PASSWORD ).ifPresent (builder ::setPassword );
155
157
readableConfig .getOptional (COMPATIBLE_MODE ).ifPresent (builder ::setCompatibleMode );
158
+ final Properties connectionProperties = getConnectionProperties (readableConfig );
159
+ connectionProperties
160
+ .stringPropertyNames ()
161
+ .forEach (key -> builder .setProperty (key , connectionProperties .getProperty (key )));
156
162
return builder .build ();
157
163
}
158
164
You can’t perform that action at this time.
0 commit comments