Skip to main content

dbtective is a Rust-powered 'detective' for `dbt metadata` best practices.

Project description

🕵️ dbtective

dbt Core dbt Fusion

dbtective is a Rust-powered 'detective' for dbt metadata best practices. As your dbt project grows, keeping metadata consistent and high-quality can become a real challenge.

CLI demo

Explore the full documentation or the possible rules.

dbtective makes it easy to spot and fix common issues, examples:

  • Missing descriptions: Does every model and seed have a description?
  • Column types: Are all columns explicitly typed?
  • Ownership: Do all sources have an owner?
  • Naming conventions: Are all marts following your team's naming standards?

We detect and enforce these rules in your cli, prek/pre-commit and CI/CD pipeline, so fast you will barely notice🕵️.

Installation

Pip (pypi)
pip install dbtective
uv

Install as a dev dependency:

uv add dbtective --dev
Homebrew
brew install feliblo/tap/dbtective
GitHub Actions

Run dbtective as part of your CI/CD pipeline. See the GitHub Actions documentation for more details.

- uses: feliblo/dbtective@v0.2.8
  with:
    config-file: "dbtective.yml"
    entry-point: "."
    only-manifest: "true"
    verbose: "false"
prek/pre-commit

Prerequisite: dbtective is installed via one of the methods above.

We recommend using --only-manifest and --hide-warnings with prek/pre-commit to avoid issues caused by catalog.json mismatches. Eligible catalog rules automatically fall back to manifest data. See the pre-commit documentation and Only Manifest Mode for details.

Add the following to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/feliblo/dbtective
    rev: v0.2.8
    hooks:
      - id: dbtective-run
        entry: dbtective run
        args: [--only-manifest, --hide-warnings, --auto-parse]

And run:

prek install
prek run --all-files
# or with pre-commit
pre-commit install
pre-commit run --all-files
Shell installer (macOS/Linux)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/feliblo/dbtective/releases/latest/download/dbtective-installer.sh | sh
PowerShell installer (Windows)
irm https://github.com/feliblo/dbtective/releases/latest/download/dbtective-installer.ps1 | iex
Binary download

Pre-built binaries for Linux, macOS, and Windows are available on the releases page.

Quickstart

All possible rules can be found in the rules documentation. Information about customizing dbtective is shown at the config documentation

  1. Generate your config file by answering a few simple questions:

    dbtective init
    

    This walks you through picking a config format, and which rules to enable. It then generates a config you can start with. See the CLI reference for details.

  2. (Optional) Generate the dbt manifest and catalog files if you haven't done so already. Most dbt commands automatically generate the manifest.json, but if you want to ensure both files are up to date, run:

    dbt compile
    dbt docs generate
    

    Tip: For local development and pre-commit, use --only-manifest to skip catalog.json. Eligible catalog rules will fall back to manifest data automatically.

  3. Run dbtective in the root of your current directory or specify an entry point if your dbt_project is not located in the root/current drectory.

    dbtective run
    dbtective run --entry-point "my_dbt_project"
    
  4. Review the output and fix any issues found.

  5. (Optional) Integrate dbtective into your CI/CD pipeline or pre-commit hooks to automate rules on every commit and/or pull request.

Contributing

We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes dbtective better for everyone.

For detailed contributing guidelines, development setup, and coding standards, please see the contributing documentation.

Acknowledgements

This project is heavily inspired by dbt-bouncer. It tries to improve certain aspects of the amazing work by pgoslatara, while giving me an opportunity to improve my Rust. More about the aspects we try to improve is available in our FAQ.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

dbtective-0.2.8-py3-none-win_amd64.whl (2.2 MB view details)

Uploaded Python 3Windows x86-64

dbtective-0.2.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dbtective-0.2.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dbtective-0.2.8-py3-none-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.2.8-py3-none-macosx_10_12_x86_64.whl (2.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file dbtective-0.2.8-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.2.8-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbtective-0.2.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 efd3a920313b036cc570523566e9747ec29ee0a05ecd60793db719f65a24023a
MD5 dbfb6f28399ad045ce93f1bf27c90585
BLAKE2b-256 c7ba84218a1bda2f3d907eb7c8dc996ccdc3c652a336bab785a1bee0fedb9703

See more details on using hashes here.

File details

Details for the file dbtective-0.2.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: dbtective-0.2.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbtective-0.2.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a45b00690319320c6362d97d42d74e9a0f605d98403171aa838a79f8795fdce5
MD5 3739c723e458affce56ea6bf60aa17f5
BLAKE2b-256 778c03a744bb225053c7b7cf27cef241ed6c57e4b7b657a06707bc1904e31da8

See more details on using hashes here.

File details

Details for the file dbtective-0.2.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: dbtective-0.2.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbtective-0.2.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ca283ffd40b1986938d667850acaa1c5c6b8d8069ed764a29f6fb755578bcd38
MD5 5e3e6ae915cfa0c7cf3c22f1bfab573d
BLAKE2b-256 46b1978303a6119c8d0345868002f3b59ca1072a35c154a7fc2ae510580b4315

See more details on using hashes here.

File details

Details for the file dbtective-0.2.8-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: dbtective-0.2.8-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbtective-0.2.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 273c2810c7ab886a4dcf20f45348a270d4895af855f214408dc39fbf0f2db4bf
MD5 84090bf905e00892ce87a1eb6121d298
BLAKE2b-256 10a7ec4c630b68e55bc2958c810d12d65d43b94f11929a9f5e5785806217b351

See more details on using hashes here.

File details

Details for the file dbtective-0.2.8-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: dbtective-0.2.8-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbtective-0.2.8-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8bce73c0140e5aea19acbb2dcb34221b5055b91a6dcdd6494f926bdd7cf43ea6
MD5 e428515505b7eae7fef7bcad7032fa62
BLAKE2b-256 cb57fecf3d30173a5e48ce828d31b9c676c5666fc2f5e1cdf249244ea4c3c834

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