Skip to main content

specdbt

CI License: MIT Python 3.12+

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

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

specdbt-0.1.0.tar.gz (166.6 kB view details)

Uploaded Source

Built Distribution

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

specdbt-0.1.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

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

Hashes for specdbt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4ffe41db74719e24508ba25396cb73466dc7dc2f12f8807d288fe312e4f5c9f
MD5 2fb217de3115b599fb6cab0ac664e534
BLAKE2b-256 a43ef81fe212dc7a0b549bacc118a4137e98efe0bead9192d174116dfe61bc4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for specdbt-0.1.0.tar.gz:

Publisher: release.yml on SanaVarsi/specdbt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for specdbt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f125c1ac2923a16e37ed98cff936f87502ccb46b1ece7ecfa1998e5ddb5da7fa
MD5 296aa4f1dfdb4b72ab182995e2a32c4e
BLAKE2b-256 9b116118e0e0a467de890a5b4479f2e6913e016f8dde8343da91aa0f65773627

See more details on using hashes here.

Provenance

The following attestation bundles were made for specdbt-0.1.0-py3-none-any.whl:

Publisher: release.yml on SanaVarsi/specdbt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

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