specdbt
BDD-style Given/When/Then testing for dbt models and macros. Write a
scenario a stakeholder can read; specdbt compiles and runs it for real
against dbt and reports pass/fail — no hand-maintained YAML, no
hardcoded expected output.
Feature: stg_customers renames the raw seed's id column
Scenario: Renames id to customer_id, passes names through unchanged
Given the following rows in "raw_customers":
| id | first_name | last_name |
| 1 | Michael | P. |
When the "stg_customers" model runs
Then the "stg_customers" should produce the following rows:
| customer_id | first_name | last_name |
| 1 | Michael | P. |
Models compile to a real dbt unit_tests: entry and run via dbt test.
Macros — which dbt has no native way to unit test — run
through a real ephemeral-table/dbt show pipeline instead. Any warehouse
dbt-core supports is in scope; DuckDB and Postgres are CI-verified,
Databricks is manually validated (see docs).
Install
uv add --dev specdbt # or: pip install specdbt
Add your warehouse's dbt adapter alongside it, e.g. uv add --dev "specdbt[postgres]" (databricks, snowflake extras also available;
DuckDB ships built in).
Quickstart
uv add --dev specdbt
uv run specdbt init features/ # scaffold an example .feature file
uv run specdbt run features/ \
--engine dbt --project-dir . --target <your target>
Docs
docs/knowledge/index.md— architecture, adapters, the two-tier model/macro design.docs/knowledge/gherkin-style-guide.md— how to write scenarios.examples/jaffle_shop/— a full worked example (just run-example).CONTRIBUTING.md— local setup, testing other adapters, release process.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specdbt-0.1.0.tar.gz.
File metadata
- Download URL: specdbt-0.1.0.tar.gz
- Upload date:
- Size: 166.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4ffe41db74719e24508ba25396cb73466dc7dc2f12f8807d288fe312e4f5c9f
|
|
| MD5 |
2fb217de3115b599fb6cab0ac664e534
|
|
| BLAKE2b-256 |
a43ef81fe212dc7a0b549bacc118a4137e98efe0bead9192d174116dfe61bc4d
|
Provenance
The following attestation bundles were made for specdbt-0.1.0.tar.gz:
Publisher:
release.yml on SanaVarsi/specdbt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
specdbt-0.1.0.tar.gz -
Subject digest:
d4ffe41db74719e24508ba25396cb73466dc7dc2f12f8807d288fe312e4f5c9f - Sigstore transparency entry: 2668985284
- Sigstore integration time:
-
Permalink:
SanaVarsi/specdbt@6a924ae7e9a5fb6462f2ef37be910d1aa590ff31 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SanaVarsi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a924ae7e9a5fb6462f2ef37be910d1aa590ff31 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file specdbt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: specdbt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f125c1ac2923a16e37ed98cff936f87502ccb46b1ece7ecfa1998e5ddb5da7fa
|
|
| MD5 |
296aa4f1dfdb4b72ab182995e2a32c4e
|
|
| BLAKE2b-256 |
9b116118e0e0a467de890a5b4479f2e6913e016f8dde8343da91aa0f65773627
|
Provenance
The following attestation bundles were made for specdbt-0.1.0-py3-none-any.whl:
Publisher:
release.yml on SanaVarsi/specdbt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
specdbt-0.1.0-py3-none-any.whl -
Subject digest:
f125c1ac2923a16e37ed98cff936f87502ccb46b1ece7ecfa1998e5ddb5da7fa - Sigstore transparency entry: 2668985353
- Sigstore integration time:
-
Permalink:
SanaVarsi/specdbt@6a924ae7e9a5fb6462f2ef37be910d1aa590ff31 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SanaVarsi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a924ae7e9a5fb6462f2ef37be910d1aa590ff31 -
Trigger Event:
workflow_dispatch
-
Statement type: