Skip to content

Support schema selection for Redshift source connector #9525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tuliren opened this issue Jan 15, 2022 · 3 comments · Fixed by #9721
Closed

Support schema selection for Redshift source connector #9525

tuliren opened this issue Jan 15, 2022 · 3 comments · Fixed by #9721
Assignees
Labels
area/connectors Connector related issues type/enhancement New feature or request

Comments

@tuliren
Copy link
Contributor

tuliren commented Jan 15, 2022

Tell us about the problem you're trying to solve

Allow users to specify which schemas to sync when setting up a Redshift connection.

Describe the solution you’d like

Similar to Postgres or Oracle source, add a schemas field in spec.json.

Describe the alternative you’ve considered or used

N/A

Additional context

@tuliren tuliren added type/enhancement New feature or request needs-triage area/connectors Connector related issues and removed needs-triage labels Jan 15, 2022
@etsybaev etsybaev self-assigned this Jan 16, 2022
@etsybaev etsybaev moved this to Implementation in progress in GL Roadmap Jan 18, 2022
@etsybaev
Copy link
Contributor

Hi @tuliren .

It seems that the Redshift jdbc driver doesn't support a schema selection as we have in ex. Postgres/Oracle/ etc.
Not sure what to do with that ticket. Should I close it as "not supported"?
Thanks

https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-obtain-url.html
https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-build-connection-url.html
https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-configuration-options.html

@etsybaev etsybaev moved this from Implementation in progress to On hold in GL Roadmap Jan 19, 2022
@tuliren
Copy link
Contributor Author

tuliren commented Jan 19, 2022

Thank you for looking into this.

The doc is a bit confusing. In the second link, it does mention schema in the URL:

jdbc:redshift://[Host]:[Port]/[Schema];[Property1]=[Value];[Property2]=[Value];

Currently we specify the database name after the port. Maybe that parameter can be the schema as well, according to this doc. Can you try something like jdbc:redshift://[Host]:[Port]/[Schema];DBNAME=[Database]?


Also, I found this in the Redshift JDBC code:

https://github.com/aws/amazon-redshift-jdbc-driver/blob/master/src/main/java/com/amazon/redshift/RedshiftProperty.java#L137

/**
 * Specify the schema (or several schema separated by commas) to be set in the search-path. This schema will be used to resolve
 * unqualified object names used in statements over this connection.
 */
CURRENT_SCHEMA(
  "currentSchema",
  null,
  "Specify the schema (or several schema separated by commas) to be set in the search-path"),

Maybe this connection URL property is not properly documented. Can you also try that? This may require upgrading to JDBC version 2.x. Currently we are using 1.2.43.1067.

@etsybaev
Copy link
Contributor

etsybaev commented Jan 20, 2022

Hi @tuliren. Thanks, I will take a look.
We already use this "schema", but this is actually is a DB name. That was a bit confusing :)
Selection_401

@etsybaev etsybaev moved this from On hold to Implementation in progress in GL Roadmap Jan 21, 2022
@etsybaev etsybaev linked a pull request Jan 23, 2022 that will close this issue
35 tasks
@etsybaev etsybaev moved this from Implementation in progress to Airbyte review in GL Roadmap Jan 24, 2022
@oustynova oustynova moved this from Airbyte review to Done in GL Roadmap Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues type/enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants