Skip to main content

Fearless testing for dbt models, powered by DuckDB.

Project description

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

Project details


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.1.20.tar.gz (304.5 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.1.20-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_dbt_duckdb-0.1.20.tar.gz
  • Upload date:
  • Size: 304.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","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.1.20.tar.gz
Algorithm Hash digest
SHA256 7360524d86c8b6171c2ba62c6ef7eb712740b854c05586cb2802b86ff663cc1e
MD5 b5607757549448098ae697805a94060e
BLAKE2b-256 95b9c01449f877df315bc6f73b34ea6707cf9a738d92391fe9222c20195513dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_dbt_duckdb-0.1.20-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","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.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e9eb728c03a3308dcf03c84bafc1767282d65f0ede16814ca90ddf45c8d9d1
MD5 8e73abfeda3de61df2cc66bc0399af21
BLAKE2b-256 161770269fda17540d9700e84ac17b23b915f1da10b63f6c09e5beca1ba0bc7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page