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

Uploaded Python 3Windows x86-64

dbtective-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dbtective-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.2.0-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.2.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.2.0-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.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 198e0e5a8a5f92a2637eb56ccf35f603ee3390aed922089bd0ec1698148dc454
MD5 fc6fb00c6516f880f2dcffd43f216eae
BLAKE2b-256 b7ae0e41b89d6b4a4695e2109ea730ec239e1c87a97a139ea26e5f1bb62284dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 791ceef5917143fbee92d6e597a46f8b45c97158bbdca89e3549149389111543
MD5 38c8b5c55ccd8eca84292f93f869386e
BLAKE2b-256 d945f85aa50e53a2035ae8eccbaed88342e8a71643df9c3ae4cf29e2c3a02331

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.0-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.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6756fac3dfcf7e3408df43589d9884ba2bb183fab476297034659c532bbffbd3
MD5 66e5344722e33f577aec4db70af29a99
BLAKE2b-256 18d171ba412278fc011b38f37d0a22ecf78dc7f588a04f1bfaa0957f816fff59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.0-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.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbb84c7dc9aa6122f7e655984c8f9d5191c1729a88b51a02c1f3803bf02b233f
MD5 e5633e5085e7a9dd6dca59a00c01cfdf
BLAKE2b-256 0194071b0a65a4201ab0b667a74cac1ab69ca487b86d16fe1f655a1eca7441f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.2.0-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.10.0 {"installer":{"name":"uv","version":"0.10.0","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.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3ed7bdb6f8f8061c354af2b1896f52962ee9d4d8cb14e9e82acc6f6013f83890
MD5 4c1817035f103c54dbf476990988e62b
BLAKE2b-256 948a6b80ce6161f10ba87b5356221c6dcf0c685bf38840a9f1022ac83875212f

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