FAQ
What is dbtective?
dbtective is a fast, lightweight linter for dbt projects written in Rust. It helps enforce best practices and coding standards across your dbt codebase by validating your project against configurable rules.How does dbtective compare to similar projects?
Similar projects (as far as I know) include:
- dbt-score - Scores entire dbt projects based on best practices
- dbt-bouncer - A configurable linter for dbt projects
dbtective is inspired by dbt-bouncer but aims to improve on it in several key areas:
| Feature | dbtective |
|---|---|
| Performance | Written in Rust for smaller binaries and faster execution (in all environments) |
| Quick start | init command generates a configuration template that works for most users |
| Configuration | Batteries-included sensible defaults with optional fine-grained customization |
| Cross-object rules | Single rules apply across multiple object types (e.g., one has_description rule for models, sources, macros etc.) |
| Documentation | Searchable rules with examples for fixing violations |
| User experience | Formatted output with clickable hyperlinks to problematic files |
How do I get started?
- Install
dbtective - Run
dbtective initin your dbt project root to generate a configuration file - Run
dbtectiveto lint your project
See the Getting Started guide for detailed instructions.
Can I use dbtective in CI/CD?
Yes!
dbtective is designed to work in CI/CD pipelines. It returns a non-zero exit code when rule violations are found, making it easy to fail builds on linting errors. For example take a look at GitHub ActionsHow do I disable or configure a specific rule?
You can configure rules in your
dbtective.toml (or equivalent) configuration file. Each rule can be enabled, disabled, or customized with specific parameters. See the Rules documentation for available options.