The set of adapter protocols and base functionality that supports integration with dbt-core
Actively maintained. Last release 4 months ago, commits in 23 of the last 26 weeks. A safe choice.
pip install dbt-postgres
dbt
dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.
dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.
dbt-postgres
dbt-postgres enables dbt to work with Postgres.
For more information on using dbt with Postgres, consult the docs.
Getting started
Review the repository README.md as most of that information pertains to dbt-postgres.
psycopg2-binary vs. psycopg2
By default, dbt-postgres installs psycopg2-binary.
This is great for development, and even testing, as it does not require any OS dependencies; it's a pre-built wheel.
However, building psycopg2 from source will grant performance improvements that are desired in a production environment.
In order to install psycopg2, use the following steps:
if [[ $(pip show psycopg2-binary) ]]; then
PSYCOPG2_VERSION=$(pip show psycopg2-binary | grep Version | cut -d " " -f 2)
pip uninstall -y psycopg2-binary
pip install psycopg2==$PSYCOPG2_VERSION
fi