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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dbtective-0.1.29-py3-none-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: dbtective-0.1.29-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.29-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c13c3310c457b8894fc94001a53d761e24110fd4be6777cdf6d31ff27dfdb7c1
MD5 66a8d13ed92841b5ef322c2e50e449c3
BLAKE2b-256 e356daf05d56cd01c73e15aace998b9bb70fbc71146a3a4266f25f5c4fb47531

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.29-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.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.29-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55e41107b61f0348216d6dcfaf6a32e604b9257e05405f22431b544ae0a2b8d9
MD5 5c46a967df06abede87599c4ffcd6f70
BLAKE2b-256 ca82c472599053fcdd6d6a6b60664d5fe2babd84c2e391886bf7b6792d7d3c30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.29-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.29-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 51c62b251e86532675b3ec89dff659240b03c20746ff416e1d5f21047fea4991
MD5 6d48f359cdf8189e935e66ef2366e9c0
BLAKE2b-256 b82d34470ee071f466c7ab1c8da414096a9aeea4d259e0bfc21ea182cc206eb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.29-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.29-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 749f571f4b58ae18fff4277e69977b2aab725cf00c558c04dfa53f2396782346
MD5 df0bb5d9c1691082e83b4ae82e39cff1
BLAKE2b-256 d25769a6e41a500317942e822040ab9ef48680a2715b3268787b01c2f65cf30c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbtective-0.1.29-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.0 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.29-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d8ef36ff2f6166840e5cc2a649bce73259f3c097cadf521eea33328ba62065c
MD5 f5f4d86bcfad22f6a9e68307c91c7867
BLAKE2b-256 e39b7097b9be479ac2335a4c0592c21499b589481398f2c59877d53452a6348c

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