Skip to main content

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

Project description

🕵️ dbtective

dbt Core dbt Fusion codecov

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

Uploaded Python 3Windows x86-64

dbtective-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dbtective-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dbtective-0.3.3-py3-none-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.3.3-py3-none-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dbtective-0.3.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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.3.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 fb29af85546a599ee5e18842762d46957ce6f4acf99745ea8c380f7976bb0515
MD5 19ded8be53514c7affc7ea1d0c8eccda
BLAKE2b-256 f6cdb6b80d90f9b0deb81d6f08f575b6cab222e6e6c211aabbcf57290fc41a88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3ef9d1df1d6e35714f04c2c763c2b1b7ca8c2317a3f0fa747f900448a851d38
MD5 de54682fa479eaf12f3e90692095e9c0
BLAKE2b-256 552b5fb2a791d015f0116ed761640df971585a270d20fdb03bdc852d9a2a457d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e67c5e37fd7468286bc0c1009959f41bcfd43927ca1d4eef752dd580ffb158f6
MD5 3032eab469cbd842e64198fcda3fc3b8
BLAKE2b-256 0db5b7a0d7af100435d2b6c6579a61e333ba8560405798e1884f54b8ccaec8a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.3.3-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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.3.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 857e5db7e56b76f38ea71260d2a4385f13d94b75ad2fdd0a1f219d9c61c61244
MD5 d450afdf92192970b36190f83e294b58
BLAKE2b-256 3caa05544dd6a09cbb11a67c9f80e244abc50b280d8e80991eccf688abb265eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.3.3-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","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.3.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 24a37b5e44ca1900bf0b532e179874fafab9702175489024486b5bb93231f73a
MD5 61b72c3b29764d6024f22998a9a1eb45
BLAKE2b-256 aa719f4d8e284f3f5bcb9c7851893f02329b6c3be674cdb022d894bfc6f4bca9

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