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 -fr                    # Include --full-refresh in the dbt command
dbtdiff -ff                    # Include --fail-fast in the dbt command

All options can be combined, or fully qualified with --command, --target, --number, --main, --fail-fast 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.2.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.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbtdiff-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 103e9a0f693e67534a16b7cf3f36467550bc65d2ad4cf89cb4c97155da579a43
MD5 59118fb2dc725b0ede83e9a8174305c1
BLAKE2b-256 77d09d13c1098082e1b9370953c10ab84ce54e58ce6a368c1c06bc8f647d3a16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtdiff-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 afa0251f496b00bdd0e904f88cd2a74ce944e2d316ca67163186606186bbb017
MD5 925760ddb63fcc2aeb847e265452f5c3
BLAKE2b-256 2c6a83400cc18a74b6086d313d6a90c6f0279bd892a01f828ad1aa1399213e36

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