Skip to main content

An extensible linter for dbt

Project description

checkers

Checkers is an extensible linter for dbt.

It's similar to other tools like dbt-project-evaluator (created by dbt-labs), among others.

By extendable, we mean that we want to make it easy to define your own best practices. This makes it possible to validate that your team's dbt projects follow the standards you decide, without needing to completely refactor your project to a new system. We also provide numerous "out of the box" checks that are aligned with dbt lab's recommendations, so that you don't need to re-invent the wheel either.

Checkers is easy to integrate with any CI system, so that changes to your project which introduce new issues are automatically flagged, and potentially blocked. It's simple to use checkers with pre-commit, GitHub actions, or any other CI system you're using.

Installation

Install the checkers command line interface with pip.

pip install checkers-cli

To view the documentation for all available commands, use the --help flag.

checkers --help

Quickstart

Navigate to your dbt project's directory. This should be a folder that contains a dbt_project.yml file.

cd path/to/dbt/project

Parse your dbt project to generate a manifest.json artifact. (Many other dbt commands generate a manifest.json, including dbt build, dbt test, etc. But we recommend using dbt parse as it usually takes just a few seconds).

dbt parse

Run the checkers.

checkers run

The results of the check will print to your console, and look similar to the following.

PASS   check_model_has_description my_first_dbt_model
PASS   check_model_has_description my_second_dbt_model

Development

This project supports development inside a devcontainer using VSCode.

After cloning this repository, VS Code should prompt you to open the project inside the devcontainer. If not, confirm you have the devcontainers extension installed.

Once the devcontainer has started you can install the necessary development dependencies inside a virtual environment.

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install --editable .

You should now be able to run the test suite.

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkers_cli-0.0.5.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

checkers_cli-0.0.5-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file checkers_cli-0.0.5.tar.gz.

File metadata

  • Download URL: checkers_cli-0.0.5.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for checkers_cli-0.0.5.tar.gz
Algorithm Hash digest
SHA256 37bb9a55543c579ea8cd86f7066028ecc1b5abe1f903127374c3d1d2349c777f
MD5 f7ec17dfb084bb8b0ff92e025b1284d3
BLAKE2b-256 4253876c93db1602260cb6291660582be0cfb7dd6daa46567b0dc06e98ada11d

See more details on using hashes here.

File details

Details for the file checkers_cli-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for checkers_cli-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 58d1fb8036fba098fa3e49e7d69aae5cf4aa2e78a30a5ca5ad31e90365b2e9e3
MD5 b01cb9d15a0b82b1a7af4d0ac8ab84d5
BLAKE2b-256 57453da91d20a56b76ab00633a1cc3931d020b2f36361f7d4bce912c36a90c13

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page