skillfed

prefect-dbt

Prefect integrations for working with dbt

prefect-dbt v0.7.25 758.9K downloads/30d#5,131 on PyPI23,623
Permissive license Apache License 2.0 Active released

What it is and what it does

prefect-dbt is a Prefect integration that bridges dbt (data build tool) and Prefect's workflow orchestration platform. It provides tasks and utilities to execute dbt commands—such as dbt run, dbt test, and dbt build—as part of larger Prefect data pipelines. This lets you orchestrate dbt model runs alongside other data tasks, apply Prefect's scheduling, retry logic, and monitoring to dbt workflows, and integrate dbt outputs into downstream pipeline steps.

The package depends on prefect, dbt-core, prefect_shell, and sgqlc. It supports Python 3.10 through 3.13 and is actively maintained. Installation is straightforward with low friction, and the permissive Apache 2.0 license poses no restrictions for most use cases.

Use it for:

  • Schedule and monitor dbt model runs as part of a larger Prefect data orchestration pipeline
  • Chain dbt transformations with upstream data ingestion and downstream analytics tasks in a single workflow
  • Apply Prefect's retry policies, error handling, and alerting to dbt command execution
  • Parameterize dbt runs within Prefect flows to test different model configurations or data subsets

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Prefect integration that orchestrates dbt workflows, allowing you to run dbt commands and tasks as part of Prefect data pipelines.

Yes, if you use both Prefect and dbt. The integration is actively maintained, has low install friction, carries no license restrictions, and solves a clear orchestration gap. Install it only if you need to run dbt within Prefect workflows; standalone dbt projects do not require it.

Install

prefect-dbt on PyPI

pip

pip install prefect-dbt

uv

uv add prefect-dbt

poetry

poetry add prefect-dbt

Installing prefect-dbt

Before you install

Low install friction with a pure Python wheel. Actively maintained with recent releases; the repository is active and well-starred, indicating ongoing support and community engagement.

License in practice

Apache License 2.0 is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most production environments.

Quickstart

pip install prefect-dbt

from prefect_dbt.cli.commands import dbt_shell_command

result = dbt_shell_command(command="dbt run")

Requires Python 3.10 or later; dbt-core must be installed separately as a runtime dependency.

Verify before relying

  • Whether prefect_shell is a required or optional runtime dependency for typical workflows
  • What sgqlc is used for within the integration and whether it is required for all use cases

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — prefect, dbt-core, prefect_shell, sgqlc
Maintenance actively maintained — 70 days since the last release
Last repo commit
First released
Downloads 758,869/month — #5,131 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: prefect_dbt-0.7.25-py3-none-any.whl

Keywords: prefect

Intended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries

Tags

dbt workflow orchestrationprefect dbt integrationrun dbt in prefectdbt task schedulingdata pipeline dbtorchestrate dbt models
dbt-integrationworkflow-orchestrationdata-pipeline

More Libraries packages