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.4
  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.4
    hooks:
      - id: dbtective-run
        entry: dbtective run
        args: [--only-manifest, --hide-warnings]

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.4-py3-none-win_amd64.whl (2.1 MB view details)

Uploaded Python 3Windows x86-64

dbtective-0.2.4-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.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dbtective-0.2.4-py3-none-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.2.4-py3-none-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dbtective-0.2.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0f26fb70ffeea76a108a24dd280a7a7f693d9e093cb1956c2f8f64d307b743f9
MD5 a61fc91f9ad0c1ed7bb11900bb3b3679
BLAKE2b-256 b482ce0f012f765d8168974ddba432c7692d03532cab2dcd0b97c8069fdefaf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.4-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.3 {"installer":{"name":"uv","version":"0.10.3","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.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 debfd78637a1154eb85f1e89fa51485004acaf1ff8fe73ca77a2cbc714ff21a6
MD5 2e6ff577f8d4f50985f77d5b1d9c71f2
BLAKE2b-256 130a2e51d46a59de8903ac7423845099495d2267562cb54976354af8eb6bc361

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.4-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.3 {"installer":{"name":"uv","version":"0.10.3","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.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 007455500d3809f3ad596b5a502bb94091ae126f5f84874ff7dba0980a511a7d
MD5 4dcbf5815341f5aa164317d10e8ce2f6
BLAKE2b-256 ce081c8567ae04d16ce820103f2687a6b9737562da501be28dde9aec809cdcf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.4-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f5120247da8dbe64de592cc1265d064db803371732951e5ea67358caaf2c6e63
MD5 f0d7d5b15f8b509000d58614859c9709
BLAKE2b-256 14bb0eb8c76241fde1c3695995d755196c44b40d4f8d94f952a035ea391eb31c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.4-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.4-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7136bf1fea9eb5c74d0b2fa5b498b6ee4276d4f7fcd2fbc55cf1ca30f7c44d9a
MD5 62107e868469be544e389269550edc86
BLAKE2b-256 0b039c61510b552a8ba6857d4ebab0e138443194a64ef573ec36fb258d128082

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