Skip to content

[FLINK-33800][JDBC/Connector] Allow passing parameters to database via jdbc url#83

Closed
snuyanzin wants to merge 2 commits intoapache:mainfrom
snuyanzin:flink33800
Closed

[FLINK-33800][JDBC/Connector] Allow passing parameters to database via jdbc url#83
snuyanzin wants to merge 2 commits intoapache:mainfrom
snuyanzin:flink33800

Conversation

@snuyanzin
Copy link
Contributor

@snuyanzin snuyanzin commented Dec 11, 2023

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

@eskabetxe
Copy link
Member

eskabetxe commented Dec 15, 2023

Hi @snuyanzin,
I can imagine that the intention would be to have all the db's with a single catalog, but being mandatory the default-database my assumption can be wrong..

Saying that and being one catalog for db, won't be better to add a new option like url (as table have), and deprecate this two.
It becomes a little strange to have the database name on the two option, and base-url being a full url..

@eskabetxe
Copy link
Member

this is also related with this: #74

@github-actions
Copy link

This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/

If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions
Copy link

This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments