duckcheck
Lightweight data quality checks powered by DuckDB — the anti–Great Expectations for teams who want pip install, one YAML file, and one command.
Status: v0.4 — CSV/Parquet/SQLite sources, custom SQL with
expectoperators, freshness, baselines, JUnit, and--format json.
60-second try
docker compose run --rm run-example # duckcheck run examples/clean.yaml
docker compose run --rm test # pytest
Why this vs alternatives
| Approach | Strength | Gap |
|---|---|---|
| duckcheck | One YAML + DuckDB, local files, CI-friendly | Not a full observability platform |
| Great Expectations | Rich ecosystem | Heavyweight setup for simple column checks |
| Soda Core | Familiar check DSL | Cloud-oriented workflow |
| Ad-hoc SQL in CI | Zero new tools | No standard report / JUnit / baselines |
Problem
Data teams need to assert column quality in CI, but Great Expectations is heavyweight and Soda Core funnels to cloud. Ad-hoc SQL checks have no reporting standard.
Key features (v0.4)
- YAML check definitions
- DuckDB scans CSV, Parquet, and SQLite locally — no server
- Checks:
not_null,unique,accepted_values,custom_sql,freshness,row_count,row_count_delta custom_sqlexpectoperators:0,=N,>N,<N,>=N,<=N(default0)--format jsonand--junitfor CI dashboards${ENV}in source URIs;--source-tablefor SQL ATTACH
Architecture
duckcheck run checks.yaml
└── SuiteSpec (Pydantic)
└── DuckDB in-process
└── source_data view from CSV/Parquet
| Component | Technology | Why |
|---|---|---|
| Engine | DuckDB | Single dependency, scans files + SQL databases |
| CLI | Click + Rich | Simple, good terminal UX |
| Spec | YAML + Pydantic | Version-controllable checks |
Installation
pip install duckcheck
pip install -e ".[dev]"
Usage
duckcheck health
duckcheck run examples/clean.yaml
duckcheck run examples/checks.yaml # fixture with known failures
duckcheck run examples/clean.yaml --junit /tmp/duckcheck.xml
duckcheck run examples/clean.yaml --format json
duckcheck baseline update examples/clean.yaml
Example checks.yaml:
name: sample-suite
source: examples/sample.csv
checks:
- name: id_not_null
type: not_null
column: id
- name: status_values
type: accepted_values
column: status
values: [active, inactive]
- name: three_active
type: custom_sql
sql: "SELECT * FROM source_data WHERE status = 'active'"
expect: "=3"
Docker
docker compose run --rm test
docker compose run --rm run-example
Running tests
pytest tests/ -v
Roadmap
- Freshness + row_count + custom_sql + JUnit
- Row-count baseline delta store (
duckcheck baseline update) - custom_sql
expectoperators +--format json - Live Postgres/MySQL ATTACH integration tests
- Airflow/Dagster operators
License
MIT
Known limitations (v0.4)
- Postgres/MySQL ATTACH is stubbed (
INSTALL/LOAD) — no live DB in CI yet examples/checks.yamlis a failing fixture;examples/clean.yamlis the happy path- Checks still run against a
source_dataview
Release files for duckcheck 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| duckcheck-0.4.0.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| duckcheck-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:27.6 kB
Release files / duckcheck-0.4.0.tar.gz
| Download URL | duckcheck-0.4.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a1d5d64cdb6d6c34bde0acb55ed95af9f91f742e128f6fd89ba8db700104987
|
|
BLAKE2b-256 checksum How to use checksums |
6f995e184dc559e52cbd2436e3c93bcc90121f8c037bc6bceb8ceedc45bf3f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / duckcheck-0.4.0-py3-none-any.whl
| Download URL | duckcheck-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d3e4ce5dfbd9676242a44b9093f1bb0fb3da38b2ff289c62300f7ff6c72d646
|
|
BLAKE2b-256 checksum How to use checksums |
e7ac55803327027347d536c34b54b1886bdf3fe95d35c29938d7c15f78d8c096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|