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.

[!WARNING] dbtective is currently in very early stages. Issues and commits are more than welcome!

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.29
  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 (currently) recommend using the --only-manifest flag with prek/pre-commit to avoid issues caused by catalog.json mismatches. For more details, see the explanation in the rules documentation.

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

repos:
  - repo: https://github.com/feliblo/dbtective
    rev: v0.1.29
    hooks:
      - id: dbtective-run
        args: [--only-manifest]

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. Create a dbtective.yml config file in the root of your dbt project by running:

More about the init (it also supports pyproject.toml or dbtective.toml) command is available in the init documentation.

dbtective init

Inspect the contents of the generated dbtective.yml file and modify it to fit your project's needs.

  1. (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
  1. 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"
  1. Review the output and fix any issues found.

  2. (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 dbt 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.31-py3-none-win_amd64.whl (1.8 MB view details)

Uploaded Python 3Windows x86-64

dbtective-0.1.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dbtective-0.1.31-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dbtective-0.1.31-py3-none-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.31-py3-none-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dbtective-0.1.31-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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.31-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 835898fbc442047a2ba16738081acf577658201a2f9032390391984b753d529d
MD5 14e74a2b4207100d8712eabfc2235346
BLAKE2b-256 e058ee0d7318c9f2c0a32a56bd399fe44d092bd55b79b0ffce96b2db60299f92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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.31-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 16087311748a89af5bf63198d0ad4f2a5785ef3242d83be9ed5c97affad74efa
MD5 90f98e71313fcb2c7b865d871e3165ba
BLAKE2b-256 adb32e83a7b6622553461e9eb200d0ca239457e7d36010518bdd663c9d04c89c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.31-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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.31-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8dcf14ae4b8ce7c227b214982f9601c509466af92b4abf91a1a5425f80536955
MD5 5b486917bb8208a4be6bd78048bec79d
BLAKE2b-256 88e46d39dff9fc4d9f420f8357a64d176411e9ca179c4c3ae3dc5c75357e20f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.31-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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.31-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2e7228fa11c829074990791bb8f06d1b66a108141c2a8d647e7c9344f4258782
MD5 ea18361d71c488fb1b2f49ec99ff4f8b
BLAKE2b-256 8e5d7e7943bb346d651830512960728b22254402bc0a5cad07f57ff1155d90b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.31-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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.31-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5c467057438a0c07d58e2578465f3a770ca75c93714d2f72dd8b9eb56735c5f7
MD5 a2d5d1d585da7a7a866151a8cf1ed146
BLAKE2b-256 6c199477f614a96d2741365cddb8030244ff3900aa180ecad574438e7ee78cf0

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