-
Notifications
You must be signed in to change notification settings - Fork 977
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
Add docs for using psycopg2
with dbt-postgres
#5707
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikealfare Thank you for this - looks great!
|
||
In versions 1.8.0 and 1.8.1, `psycopg2-binary` is installed on MacOS and Windows operating systems and `psycopg2` is installed on Linux operating systems. | ||
This has the side effect of requiring the OS dependencies identified above to install `dbt-postgres` on Linux. | ||
Users will either need to update their workflows to install these dependencies, or upgrade to 1.8.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Given that we recommend users always install the latest (patch) version, no one should be installing v1.8.0 or v1.8.1 (instead of v1.8.2+) — but given you've already written it, I'm happy to have it in here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the recommendation. I'm trying to be cognizant of the fact that dbt-postgres
tends to be used more as a base adapter than other adapters (e.g. what we used to do with dbt-redshift
). I thought it might be more likely in those scenarios that folks are hard pinning the version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little nits and thoughts for final revision.
Co-authored-by: Mila Page <[email protected]>
Co-authored-by: Mila Page <[email protected]>
Co-authored-by: Mila Page <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VersusFacit I incorporated most of your feedback. Let me know what you think of the updated version.
|
||
In versions 1.8.0 and 1.8.1, `psycopg2-binary` is installed on MacOS and Windows operating systems and `psycopg2` is installed on Linux operating systems. | ||
This has the side effect of requiring the OS dependencies identified above to install `dbt-postgres` on Linux. | ||
Users will either need to update their workflows to install these dependencies, or upgrade to 1.8.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the recommendation. I'm trying to be cognizant of the fact that dbt-postgres
tends to be used more as a base adapter than other adapters (e.g. what we used to do with dbt-redshift
). I thought it might be more likely in those scenarios that folks are hard pinning the version.
@matthewshaver is there a blocker to merging this? |
Happy to merge this for you tomorrow @mikealfare if there are no issues. This isn't tied to v1.9 right? |
I'm not sure what is meant by "tied to v1.9". This takes effect in |
great thanks @mikealfare, was just making sure this wasn't an upcoming 1.9 feature but you're right - it's very clear this is live already. ! will merge this pr for yoU! |
What are you changing in this pull request and why?
We changed how
dbt-postgres
is installed with regards topsycopg2
versuspsycopg2-binary
.In prior versions you could configure it with an environment variable. In 1.8, that's not an option because we changed our build tooling to a more modern stack. We initially tried an OS-driven approach, but that had issues mainly due to CI workflows that normally run on linux images. So in 1.8.2 we reverted back to installing
psycopg2-binary
by default and prescribed the manual workaround of uninstallingpsycopg2-binary
and reinstallingpsycopg2
.Checklist