New to Kestra?
Use blueprints to kickstart your first workflows.
Run dbt ELT pipelines on PostgreSQL from Git using Docker and Kestra. Execute dbt deps and dbt build to transform data in your Postgres warehouse.
Run a production-ready dbt ELT pipeline on PostgreSQL by pulling a dbt project straight from a Git repository and executing it inside a reproducible Docker container. This blueprint solves a common analytics engineering problem: keeping dbt transformations version-controlled in Git while running them on a schedule or on demand against operational and analytical Postgres databases, without manually managing the dbt environment, dependencies, or database credentials on a host machine.
io.kestra.plugin.core.flow.WorkingDirectory task (git) creates an isolated working directory so the cloned project and dbt commands share the same filesystem context.io.kestra.plugin.git.Clone (clone_repository) clones the dbt project from the main branch of the configured GitHub url.io.kestra.plugin.dbt.cli.DbtCLI (dbt) runs in the ghcr.io/kestra-io/dbt-postgres:latest container image with a postgres profile. Credentials are injected through {{ secret('POSTGRES_USER') }} and {{ secret('POSTGRES_PASSWORD') }}, never hardcoded.dbt deps to install package dependencies, then dbt build to run models, tests, snapshots, and seeds against the dev target.dbt build stepdbt itself has no scheduler, retry logic, or event triggers. Kestra adds event-driven and scheduled triggers, automatic retries on transient database or network failures, full execution logs and lineage across the clone and build steps, and a declarative YAML definition you can keep in Git alongside the dbt project. You also get a clear handoff point to chain dbt runs with upstream ingestion or downstream notifications, which dbt's own tooling cannot coordinate.
host, port, dbname, and schema in the profile to match yours)kestra-io/dbt-example)POSTGRES_USER: the PostgreSQL user dbt connects asPOSTGRES_PASSWORD: the password for that userPOSTGRES_USER and POSTGRES_PASSWORD secrets to your Kestra instance.clone_repository url and branch at your own dbt repository.profiles block so host, port, dbname, and schema match your database.io.kestra.plugin.core.trigger.Schedule trigger to run the pipeline on a cron cadence.dev target for prod or parameterize the profile with flow inputs per environment.dbt build with dbt run plus dbt test, or add dbt docs generate to publish documentation.