Skip to main content

PyTest dbt Duckdb 🦆

Fearless testing for dbt models, powered by DuckDB.

What is this?

pytest-dbt-duckdb is an open-source testing framework that allows you to validate dbt models end-to-end, using DuckDB as an in-memory execution engine. Designed for speed, portability, and CI/CD automation, it enables you to test dbt transformations before deployment, ensuring trust in your data.

🩺 Why This Exists

"Assumptions are dangerous." An untested model is a ticking time bomb—silent, unseen, but waiting to fail at the worst possible moment. This library ensures your transformations, dependencies, and outputs are battle-tested before deployment.


💡 Data must be tested, not trusted.

Modern analytics teams move fast—but in their race to ship, they often skip a crucial step: rigorous testing. A broken transformation can mean misreported revenue, misleading product insights, or silent failures that creep into dashboards.

"Each dbt model untested is a story unfinished."

Here, in the shadows of SQL models and YAML configurations, we forge a guardian—a pytest plugin that ensures every dbt model is battle-tested, validated, and ready before it touches production.

With DuckDB as the testing engine, you can:

  • Define test cases with simple YAML scenarios.
  • Execute them in DuckDB, locally and instantly—no warehouse needed.
  • Integrate with CI/CD pipelines, catching errors before deployment.
  • Extend with custom DuckDB functions for specialized assertions.

Data must be tested, not trusted. Let’s test fearlessly.

Image title


🚀 Who is this for?

Whether you are a craftsman of data or a guardian of analytics, this library is your lantern in the dark, guiding you toward precision and reliability.

  • Data Engineers → Validate dbt models before they reach production.
  • Analytics Engineers → Ensure clean, tested data in dashboards.
  • CI/CD Developers → Automate SQL testing in pull requests.

🎯 Key Features

Feature Description
✅ Fast Testing Runs entirely in DuckDB—no warehouse costs.
🛠️ YAML-Based Tests Define test scenarios using declarative YAML.
♻️ CI/CD Ready Seamless integration with GitHub Actions, Jenkins, GitLab CI/CD.
🔌 Custom Functions Extend with user-defined DuckDB functions.
🧪 Snapshot Testing Compare actual vs. expected outputs with precision.
🏷️ Extra dbt Args Pass arbitrary dbt CLI flags (e.g. microbatch date windows) to both dbt seed and dbt build, per scenario.

How It Works

➡️ See the Usage Section

Metadata

Release files for pytest-dbt-duckdb 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-dbt-duckdb 0.2.1
File Size Uploaded Provenance
pytest_dbt_duckdb-0.2.1.tar.gz 322.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-dbt-duckdb 0.2.1
File Interpreter ABI Platform
pytest_dbt_duckdb-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 342.6 kB

Release files / pytest_dbt_duckdb-0.2.1.tar.gz

Download URL pytest_dbt_duckdb-0.2.1.tar.gz
Size 322.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9330269bd114b1b30affa91cd2d71d2715658e7e2e0b620718f919db89eaf97b
BLAKE2b-256 checksum
How to use checksums
325ea62a0307795957d48ea9fd55fcc60cbdd7b3a317433278f97a2dd31a0f8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pytest_dbt_duckdb-0.2.1-py3-none-any.whl

Download URL pytest_dbt_duckdb-0.2.1-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0049c0d23684319e4e295b6ad61e75f017eabed855c4ebadd83e3e6e99613768
BLAKE2b-256 checksum
How to use checksums
a52d042ac4a70ae644ad48e41d6bda325ec4451cc15eee296a7a72041f337e09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pytest-dbt-duckdb 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page