Skip to content
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

Added support for pg8000 as the PostgreSQL driver #3142

Merged
merged 8 commits into from
Mar 12, 2022

Conversation

rscarvalho
Copy link
Contributor

@rscarvalho rscarvalho commented Jan 29, 2022

Description

Added support for the pg8000 library as the PostgreSQL driver.

Motivation and Context

I'm trying to ingest data into a Gooel Cloud SQL instance without having to use cloud_sql_proxy and found this library: https://github.com/GoogleCloudPlatform/cloud-sql-python-connector#cloud-sql-connector-for-python-drivers, however that only has support for pg8000 to connect to PostgreSQL.

Both pg8000 an psycopg2 implement DB API 2.0 (a.k.a. PEP-249) so most of the operation should be supported; I've just made a few changes to make sure we handle exceptions in a cross-library way.

Have you tested this? If so, how?

I ran my jobs with these changes and they worked fine.

@rscarvalho rscarvalho marked this pull request as ready for review January 31, 2022 12:53
@rscarvalho rscarvalho requested review from dlstadther and a team as code owners January 31, 2022 12:53
narape
narape previously approved these changes Jan 31, 2022
@narape narape dismissed their stale review January 31, 2022 14:35

Waiting for build results

Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; i'm going to update with master and let tests run. if all pass, i'll merge

Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only check failure was codecov on patch additions. Not worried about that. Merging!

@dlstadther dlstadther merged commit 412272f into spotify:master Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants