Skip to main content

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

Project description

🕵️ dbtective

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.1.32
  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.See the pre-commit documentation.

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

repos:
  - repo: https://github.com/feliblo/dbtective
    rev: v0.1.32
    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
    
  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.1.32-py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 3Windows x86-64

dbtective-0.1.32-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.1.32-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.32-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.1.32-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.1.32-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.32-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 29670095d197a201dedf574d40353476b1f380f1e71ce6fe2865bac574401de1
MD5 0a0aeb2852948fbbed48ecc31dc5d8b2
BLAKE2b-256 14f8426fb168485b19e920d83770bb0645bdb15a333cac37bf852c07dd05d14a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.32-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.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.32-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e9a224bd520f3e56c2889be5f85fc66479fc46f3b2559aedf47844d03897284
MD5 83226ec087049589925d5fbd231084c4
BLAKE2b-256 551b6c85c251f1f243508eefc314a87e5fcb011643b26a3f252d009234a92682

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.32-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.32-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 958efacda2b2999952128fed2a87542c08967e76ff1813a3230aae66d2da0c82
MD5 66d055083f1bd382f4a189d1637ab02a
BLAKE2b-256 17989891d4ad56090186d4cb69edfc00c2b40f2fdc27cd24733f41bcf8e25d23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.32-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.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.32-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5104d1fca348603474816a754352183844b74ac940d2ac022ab99db8526b6c5c
MD5 3ec4634e5c15be7b44666354c93926e3
BLAKE2b-256 6e8de23b52d665586edc3d3c76cc51e116db8ed24fe46b60a0d68366f1fa9405

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.32-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.9.30 {"installer":{"name":"uv","version":"0.9.30","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.1.32-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d193e5489fb78b9ec160b1048b5b2c3f44c6d89f342e79e02826c0b96470b06d
MD5 8f520086c94de7f1c542afa143037b6d
BLAKE2b-256 2a76a4e9427d2485d996bff3ecf0f61dc20705edb3da605ea9bd137675d7b02f

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