dbt PostgreSQL (EDK preview)

dbt-postgres from dbt-labs

The dbt-postgres utility is an adapter-specific dbt transformer for running SQL-based transformations on data stored in your warehouse.

EDK Preview

This utility is in a preview stage of readiness. It is based upon our Extension Developer Kit (EDK) which is the new way to build and add plugins to Meltano Hub. This preview of dbt will replace the native transformer once it comes out of preview. In the meantime, we would appreciate any feedback in the EDK repo and in the dbt Extension repo.

Getting Started


If you haven't already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

  1. Add the dbt-postgres utility to your project using
    meltano add
  2. meltano add utility dbt-postgres
  3. Configure the dbt-postgres settings using
    meltano config
  4. meltano config dbt-postgres set --interactive

Next steps

  1. If you're running dbt for the first time in a new environment:
# create a starter dbt_project.yml file, a profiles.yml file, and models directory
meltano invoke dbt-postgres:initialize

If you run into any issues, learn how to get help.


This plugin currently has no capabilities defined. If you know the capabilities required by this plugin, please contribute!


Settings for dbt itself can be configured through dbt_project.yml as usual, which can be found at transform/dbt_project.yml in your Meltano project. dbt also has adapter-specific documentation for PostgreSQL.

The dbt-postgres settings that are known to Meltano are documented below. To quickly find the setting you're looking for, click on any setting name from the list:

You can override these settings or specify additional ones in your meltano.yml by adding the settings key.

Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.

Skip Pre-invoke (skip_pre_invoke)

  • Environment variable: DBT_POSTGRES_SKIP_PRE_INVOKE
  • Default Value: false

Whether to skip pre-invoke hooks which automatically run dbt clean and deps

dbt Profile type (type)

  • Environment variable: DBT_POSTGRES_TYPE
  • Default Value: postgres
[No description provided.]

Projects Directory (project_dir)

  • Environment variable: DBT_POSTGRES_PROJECT_DIR
  • Default Value: $MELTANO_PROJECT_ROOT/transform
[No description provided.]

Profiles Directory (profiles_dir)

  • Environment variable: DBT_POSTGRES_PROFILES_DIR
  • Default Value: $MELTANO_PROJECT_ROOT/transform/profiles/postgres
[No description provided.]

Host (host)

  • Environment variable: DBT_POSTGRES_HOST

The postgres host to connect to.

User (user)

  • Environment variable: DBT_POSTGRES_USER

The user to connect as.

Password (password)

  • Environment variable: DBT_POSTGRES_PASSWORD

The password to connect with.

Port (port)

  • Environment variable: DBT_POSTGRES_PORT

The port to connect to.

Database (dbname)

  • Environment variable: DBT_POSTGRES_DBNAME

The db to connect to.

Schema (schema)

  • Environment variable: DBT_POSTGRES_SCHEMA

The schema to use.

Keep Alives Idle (keepalives_idle)

  • Environment variable: DBT_POSTGRES_KEEPALIVES_IDLE

Seconds between TCP keepalive packets.

Search Path (search_path)

  • Environment variable: DBT_POSTGRES_SEARCH_PATH

Overrides the default search path.

Role (role)

  • Environment variable: DBT_POSTGRES_ROLE

Role for dbt to assume when executing queries.

SSL Mode (sslmode)

  • Environment variable: DBT_POSTGRES_SSLMODE

SSL Mode used to connect to the database.


The dbt-postgres utility supports the following commands that can be used with
meltano invoke


  • Equivalent to: build

Will run your models, tests, snapshots and seeds in DAG order.

meltano invoke dbt-postgres:build [args...]


  • Equivalent to: clean

Delete all folders in the clean-targets list (usually the dbt_modules and target directories.)

meltano invoke dbt-postgres:clean [args...]


  • Equivalent to: compile

Generates executable SQL from source model, test, and analysis files. Compiled SQL files are written to the target/ directory.

meltano invoke dbt-postgres:compile [args...]


  • Equivalent to: debug

Debug your DBT project and warehouse connection.

meltano invoke dbt-postgres:debug [args...]


  • Equivalent to: deps

Pull the most recent version of the dependencies listed in packages.yml

meltano invoke dbt-postgres:deps [args...]


  • Equivalent to: describe

Describe the

meltano invoke dbt-postgres:describe [args...]


  • Equivalent to: docs generate

Generate documentation for your project.

meltano invoke dbt-postgres:docs-generate [args...]


  • Equivalent to: docs serve

Serve documentation for your project. Make sure you ran `docs-generate` first.

meltano invoke dbt-postgres:docs-serve [args...]


  • Equivalent to: source freshness

Check the freshness of your source data.

meltano invoke dbt-postgres:freshness [args...]


  • Equivalent to: initialize

Initialize a new dbt project. This will create a dbt_project.yml file, a profiles.yml file, and models directory.

meltano invoke dbt-postgres:initialize [args...]


  • Equivalent to: run

Compile SQL and execute against the current target database.

meltano invoke dbt-postgres:run [args...]


  • Equivalent to: seed

Load data from csv files into your data warehouse.

meltano invoke dbt-postgres:seed [args...]


  • Equivalent to: snapshot

Execute snapshots defined in your project.

meltano invoke dbt-postgres:snapshot [args...]


  • Equivalent to: test

Runs tests on data in deployed models.

meltano invoke dbt-postgres:test [args...]

Something missing?

This page is generated from a YAML file that you can contribute changes to.

Edit it on GitHub!

Looking for help?

If you're having trouble getting the dbt-postgres utility to work, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the


meltano add utility dbt-postgres

Maintenance Status

  • Maintenance Status
  • Stars
  • Forks
  • Open Issues
  • Open PRs
  • Contributors
  • License


  • dbt Labs

Meltano Stats

  • Total Executions (Last 3 Months)
  • Projects (Last 3 Months)


  • meltano_edk