Skip to main content

Run dbt on changed models with model+ chaining.

Project description

dbtdiff

PyPI version PyPI - Python Version

A CLI tool to run dbt only on changed models with model+ chaining.

Installation

pip install dbtdiff

Features

The default behavior is to run dbt build on all downstream models that have changed since the last commit, using the HEAD reference. It supports:

  • Custom commands (e.g., dbt run, dbt test)
  • Custom targets
  • Custom number of downstream models to include
  • Ability to compare to main rather than your last commit.

Usage

dbtdiff                        # Compare against last commit
dbtdiff -m                     # Compare against origin/main
dbtdiff -c run                 # Swap `build` for `run`, dbt run -t dev
dbtdiff -n 1                   # Run only run 1 downstream model
dbtdiff -t prod                # Use the prod target, eg: dbt build -t prod
dbtdiff -f                     # Include --full-refresh in the dbt command

All options can be combined, or fully qualified with --command, --target, --number, --main and --full-refresh.

Quick QOL Roadmap

  • Support for seeds
  • Support for snapshots
  • Only run modified tests from .yml
  • Custom branch names
  • Macro change support

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

dbtdiff-0.2.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

dbtdiff-0.2.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file dbtdiff-0.2.1.tar.gz.

File metadata

  • Download URL: dbtdiff-0.2.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for dbtdiff-0.2.1.tar.gz
Algorithm Hash digest
SHA256 32f2f560b99f08d5b9b92a8b4cbc136f088e7443d36cdf547d0cae5538f7e700
MD5 4678fa70e953e01de736a12197b902c1
BLAKE2b-256 b0fdc27a7eb4a29f7a97460a2c752cc7dac7d0953475275ccc06989805637b08

See more details on using hashes here.

File details

Details for the file dbtdiff-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dbtdiff-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for dbtdiff-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 008673cb192da0e47c3b4a8cb34adc174a9eba3bd72076763c740e55d83121eb
MD5 6218dc4f59519e42d46315c9d5c18429
BLAKE2b-256 cb4554539f9d418882bb810e738b9d45893f38fc4e39e9d63869b6461091a3d7

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