← All Adapters
Official dbt PostgreSQL adapter docs ↗
POSTGRESQL
type: postgresOpen-source relational database. The most popular choice for on-premises analytics and operational data stores.
DVT SUPPORT
✓ FEDERATION SOURCE
read in federation models
✓ FEDERATION TARGET
materialize federation results
✓ DEFAULT TARGET
run full dbt projects against it
✓ SEED TARGET
dvt seed --target loads here
DVT supports PostgreSQLbecause both dbt and Sling do: dbt drives standard materializations when it's your default target, Sling moves data in and out during federation. Connectivity for both layers is checked with dvt debug --all.
PREREQUISITES
Driver: psycopg2 — installed automatically by:
dvt sync
CONFIGURATION FIELDS
| FIELD | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| type | string | yes | — | Must be `postgres` |
| host | string | yes | localhost | Database server hostname or IP |
| port | integer | no | 5432 | Database server port |
| user | string | yes | — | Database username |
| password | string | yes | — | Database password. Use `{{ env_var('PG_PASSWORD') }}` |
| dbname | string | yes | — | Database name |
| schema | string | no | public | Default schema for models |
| threads | integer | no | 4 | Number of parallel threads |
| sslmode | string | no | prefer | SSL mode: disable, require, verify-full, verify-ca |
PROFILES.YML EXAMPLE
my_project:
target: dev
outputs:
dev:
type: postgres
host: localhost
port: 5432
user: analytics
password: "{{ env_var('PG_PASSWORD') }}"
dbname: analytics_db
schema: public
threads: 4SOURCES.YML EXAMPLE
sources:
- name: operational_db
meta:
connection: pg_ops # points to profiles.yml output
schema: public
tables:
- name: customers
- name: orders
- name: productsDBT ADAPTER FEATURES
When PostgreSQL is your default target, every standard dbt model runs through the official dbt adapter — all of its documented capabilities apply unchanged:
MATERIALIZATIONS
tableviewincrementalephemeralmaterialized_viewf_tablef_incrementalINCREMENTAL STRATEGIES
appendmergedelete+insertmicrobatchNOTABLE CONFIGS
- ▸indexes
- ▸unlogged tables
FEDERATION INCREMENTAL STRATEGIES
Strategies available when this engine is the target of a f_incremental model:
✓ Append✓ Delete+Insert✓ Merge