dbt-postgres
The set of adapter protocols and base functionality that supports integration with dbt-core
What it is and what it does
dbt-postgres is the PostgreSQL adapter for dbt, the transformation tool that brings software engineering practices to data analytics. It enables you to write, test, and version-control SQL transformations as code, turning raw warehouse data into analysis-ready tables through dbt's templating, testing, and documentation framework.
The package bundles dbt-core with PostgreSQL-specific connection handling, dependency resolution, and query execution. It ships with psycopg2-binary by default for frictionless local development, though the documentation recommends compiling psycopg2 from source in production for performance gains. The adapter supports Python 3.10 through 3.14 and is actively maintained.
Use it for:
- Build modular, testable SQL transformation pipelines in PostgreSQL without writing boilerplate connection code
- Version-control and document data warehouse schemas as code alongside your analytics logic
- Implement data quality tests and lineage tracking for tables transformed from raw warehouse data
- Organize complex multi-step transformations (denormalization, filtering, aggregation) as a DAG of interdependent models
- Migrate transformation logic between environments (dev, staging, production) using dbt profiles
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dbt-postgres is a dbt adapter that connects dbt to PostgreSQL databases, enabling data transformation workflows using SQL and dbt's templating and testing framework.
Yes. dbt-postgres is actively maintained, has no known vulnerabilities, installs with low friction, and is the standard way to use dbt with PostgreSQL. Install it if you are building or maintaining data transformation pipelines in Postgres and want version control, testing, and documentation for your SQL logic. Consider compiling psycopg2 from source in production for better performance.
Install
dbt-postgres on PyPI
pip
pip install dbt-postgresuv
uv add dbt-postgrespoetry
poetry add dbt-postgresInstalling dbt-postgres
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a release 29 days ago. Depends on dbt-core, dbt-adapters, dbt-common, agate, and psycopg2-binary; the description notes that psycopg2-binary is convenient for development but recommends building psycopg2 from source for production performance.
License in practice
Licensed under Apache Software License (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install dbt-postgres
import dbt.adapters.postgres
# Configure dbt_project.yml with postgres profile, then run:
# dbt run
Requires Python 3.10 or later. PostgreSQL connection credentials must be configured in dbt profiles.yml before running transformations.
Verify before relying
- Whether psycopg2-binary's pre-built wheel is sufficient for typical development workflows or if source compilation is routinely needed
- Performance characteristics and typical latency for transformation jobs on various data volumes
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — agate, dbt-adapters, dbt-common, dbt-core, psycopg2-binary |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,080,609/month — #1,790 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dbt_postgres-1.11.0-py3-none-any.whl
Keywords: adapter, adapters, database, dbt, dbt Cloud, dbt Core, dbt Labs, dbt-core, elt, postgres
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbt-bigquerydbt-bigquery is a dbt adapter that enables data…
permissive · top 5,000 on PyPI
dbt-exasoldbt-exasol is a dbt adapter that enables data…
copyleft · top 5,000 on PyPI
dbt-snowflakedbt-snowflake is the Snowflake adapter for dbt,…
permissive · top 5,000 on PyPI
dbt-oracledbt-oracle is a dbt adapter that enables data…
permissive · top 15,000 on PyPI
dbt-sparkdbt-spark is the Apache Spark adapter for dbt,…
permissive · top 5,000 on PyPI
dbt-redshiftdbt-redshift is an adapter that enables dbt to…
permissive · top 5,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
dbt-gluedbt-glue is a dbt adapter that enables running…
permissive · top 15,000 on PyPI
dbt-dremiodbt-dremio is a dbt adapter that enables data…
permissive · top 15,000 on PyPI