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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.28-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.28-py3-none-win_amd64.whl.

File metadata

  • Download URL: dbtective-0.1.28-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.28-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 aadcfd6ceddcf7e95e4055654afdadd92b3e4f83534c9531b1c62bae4d46f4e1
MD5 d463c7f949e331322ac0c24ef8e3a85a
BLAKE2b-256 4cff094c857f728eb8154d7acf8ce57caf03349784a76bd8b0ff5a8aed2bb01b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.28-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.28-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 647d970626cb1b2acbf1ad4f220196456e6b54024ba17e4fab63175e021e53b7
MD5 8074b23849d927d1179d275faaa2b73a
BLAKE2b-256 d364bbadf833bfebdeccc95ffa73f91af8ec46ea2f483cbb276c2ea231257b69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.28-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.28-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 450c58261454a9f24d9e356c6733ee81da2426721688a49e9454554965904161
MD5 99c2d2092c840c2af559ad803c504715
BLAKE2b-256 6dd43526a51aa6feaeb689814c0eba587b4812e836a7300e4108a8f931003f77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.28-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.28-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d88369595ffa02c3f5e1be5042b5975f82e5d76819d124dfa8ee95c10d6896a
MD5 829a4748864831a13b892abbc0fb4486
BLAKE2b-256 63ea852684dd107fcb158b5ead393f279cba1dd451122543c6303980df9d8677

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.28-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.28-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b97cec761d35693ac28cb2186753bca8bb0bbc19bb54edd7ca00011e940133a8
MD5 a76a1710e0991277c25fa985d8df22b7
BLAKE2b-256 4aa384d827b446ad349c9a734520e4684997a11e4c0d668264a493f8d361dbc9

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