flink-connector-jdbc
flink-connector-jdbc copied to clipboard
[FLINK-33800][JDBC/Connector] Allow passing parameters to database via jdbc url
The idea is pretty straightforward: from one side there is a jdbc url which is normally is provided by most of the dbs providers to connect to. From the other side for some, probably historical reasons, there a separate property for default database which is used for default url.
To not break former behaviour it is possible to specify either database in jdbcurl or database with extra parameters only if database is same as ifor a dedicated property for default database. In fact I tend to think to mark it as a deprecated since all the info could be extracted from jdbc url
so after this PR it is possible to have something like
CREATE CATALOG postgres WITH (
'type'='jdbc',
'property-version'='1',
'base-url'='jdbc:postgresql://my_postgres:12691/defaultdb?sslmode=require',
'default-database'='defaultdb',
...
);
or similar thing for create table/view