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 checks.

[!WARNING] dbtective is currently in very early stages. Issues and commits are welcome, but don't rely on us yet!

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.27
  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 checks documentation.

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

repos:
  - repo: https://github.com/feliblo/dbtective
    rev: v0.1.27
    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 checks can be found in the checks 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 checks 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.27-py3-none-win_amd64.whl (1.8 MB view details)

Uploaded Python 3Windows x86-64

dbtective-0.1.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.27-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.27-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.1.27-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.18 {"installer":{"name":"uv","version":"0.9.18","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.27-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e8865a01a6da8d01306fb9476b5ed3de48c178d5823e30d6a9ab7dea75dae486
MD5 200339561ee1c16b937960289c98a1f9
BLAKE2b-256 6761474d98fc3ba20e46d8962a88b8cc92187d1e87953ab60e2fe417a0959a90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","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.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d1ae4668dac400f05149951744f1fe40a1fd92fa07464fba3ce691dff924489f
MD5 fda3fbf19bcf6499e3ed8d055ff1168a
BLAKE2b-256 05d49cdf1e4f9f1dc3345cbaa7295a493d0ca295887cd49c5b0c436f97d9060c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.27-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.18 {"installer":{"name":"uv","version":"0.9.18","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.27-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72fbb3d023327eb69631d354aad7f07ece893bc1bb7f6921abad279467dd4bc2
MD5 4a0ab27858bd564876543e3182d7619c
BLAKE2b-256 50b2ad4dd9a9a0e200c5cfa0f52685ffc0864bac1e6b5fb33481913b9f25f54c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.27-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.18 {"installer":{"name":"uv","version":"0.9.18","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.27-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ed846831ba7016c0fd2c0a65bd49e2e4da17e88e14c5f7a4bf1bd13f36f3e7c
MD5 a4be3929251cc1f5c053627421a276a3
BLAKE2b-256 3c377ff7ddbec2fb51f7e7fa34af37e2686ed633789ede71b90ce8fb8ddfd789

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.27-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.18 {"installer":{"name":"uv","version":"0.9.18","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.27-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6b3d64d89b5287583fee9ec57b48b72abb3943e05f12d58305848281447572c3
MD5 198841cb75c695484ed945e5f70bca78
BLAKE2b-256 a7fde67ebacb1606065675a591d510ee446330078500a81f1fcbd0320c86bcc2

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