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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_dbt_duckdb-0.2.0.tar.gz (321.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_dbt_duckdb-0.2.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_dbt_duckdb-0.2.0.tar.gz.

File metadata

  • Download URL: pytest_dbt_duckdb-0.2.0.tar.gz
  • Upload date:
  • Size: 321.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for pytest_dbt_duckdb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 145d68b1828bbc0e94e5bd1ac15f45ca5d99af9216e0e3739389d66af5c357d1
MD5 4f73f6886f38c1c7e83de160df363f86
BLAKE2b-256 15313083b3fa2d39862749043d3a7e03839548dd1e39cb2657af4910ee5a1a49

See more details on using hashes here.

File details

Details for the file pytest_dbt_duckdb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_dbt_duckdb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for pytest_dbt_duckdb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8500a092cb2dad7146fa2e1989edcdb693af983424932a63346bc66cf079a836
MD5 c733bfe83aa4542e3cd4cfb3afcbf1e9
BLAKE2b-256 d1fff676427d94da4a290ee27b142612e91dadc886ca5d9477a5bc100c1a65f2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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