Pre-commit & Prek

This guide covers how to integrate dbtective with pre-commit hooks using pre-commit or prek.

For details on --only-manifest mode, manifest fallback for catalog rules, and our recommendations for local vs CI/CD usage, see Only Manifest Mode.

Pre-commit Setup

We recommend running with --only-manifest and --hide-warnings for pre-commit hooks:

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/feliblo/dbtective
    rev: v0.2.2
    hooks:
      - id: dbtective-run
        entry: dbtective run
        args: [--only-manifest, --hide-warnings]

This avoids stale catalog issues while still catching metadata problems. Eligible catalog rules will automatically fall back to manifest data.