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

Uploaded Python 3Windows x86-64

dbtective-0.1.30-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.30-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.30-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.30-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.1.30-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.30-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a805c61c0a8bed09b53c63d252236dad1bb5b2dfb7dc5a7ea5a8ccdb877299d0
MD5 e85bf649ee28763fd2de240976f5f467
BLAKE2b-256 1d4ad643d81644cc80a5a50e6e13300c16c874e08a95439df99dbe05e11205ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.30-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.30-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e8af5f76ef882ccb14e1eafc27ea3934245dd226d05632f1cffc3f96de70f3a
MD5 9a8a4204ff42ba745326d2f0dcdd36c6
BLAKE2b-256 d77b55cf1f5a595636a3a2abb21d8b841c3be5fbcac70190ccbc2b10c13da20d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.30-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.30-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0b792f4361ee98e56a7fb1c039b709ac747f944aa32d4cbf72249405b4ea21e0
MD5 1202b74456bd67a5013cd4c0ac8e1610
BLAKE2b-256 85ec9370950e8146ad192d35a5fccef3b8da6cbbe20dd7ed2fad8604ca8be1b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.30-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.30-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7572737f2bcb1155856c3a01e951ceb389cdf39c05a08c79ad59faef81c8b740
MD5 31121cb86baa02360161500b1ad17d48
BLAKE2b-256 8c73267b1ddcd43edf0a212bd4d327c6cc30849ec549d469d6789527433166cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.30-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.30-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 41a4532aa72cbe532d6957a758e1a467ffd55a4ffac50bf570856e3f568a9f8a
MD5 a281c8d04e1e16dabf95536d38786556
BLAKE2b-256 30ede2c1ca31e367bc498c2b03e54cfb2ea7de7431555e1cda03a7b0bfa949c0

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