Skip to main content

Enforce standards for your dbt projects through automated checks and generators

Project description

dbt-contracts

PyPI Version Python Version Documentation
PyPI Downloads Code Size Contributors License
GitHub - Validate GitHub - Deployment GitHub - Documentation

Enforce standards for your dbt projects through automated checks and generators

Contents

Installation

Install through pip using one of the following commands:

pip install dbt-contracts
python -m pip install dbt-contracts

Contracts Reference

Below you will find a list of all available contracts grouped by the dbt object it operates on. Refer to this list to help when designing your contract file.

Models

Filters

  • is_materialized: Check whether the given node is configured to be materialized.
  • meta: Check whether a given resource has any matching meta to the accepted_values.
  • name: Check whether a given item has a valid name.
  • paths: Check whether a given item has a valid path.

Enforcements

Model Columns

Filters

  • meta: Check whether a given resource has any matching meta to the accepted_values.
  • name: Check whether a given item has a valid name.

Enforcements

Sources

Filters

  • is_enabled: Check whether the given source is enabled.
  • meta: Check whether a given resource has any matching meta to the accepted_values.
  • name: Check whether a given item has a valid name.
  • paths: Check whether a given item has a valid path.

Enforcements

  • exists: Check whether the node exists in the database.
  • has_all_columns: Check whether the node properties contain all available columns of the node.
  • has_description: Check whether the given resource has a description set.
  • has_downstream_dependencies: Check whether the given source has freshness configured.
  • has_expected_columns: Check whether the node properties contain the expected set of columns.
  • has_freshness: Check whether the given source has freshness configured.
  • has_loader: Check whether the given source has a loader configured.
  • has_matching_description: Check whether the given node has a description configured which matches the remote resource.
  • has_properties: Check whether the given resource has properties set in an appropriate properties file.
  • has_tests: Check whether the given node has an appropriate number of tests.
  • meta_has_accepted_values: Check whether the resource's meta config is configured as expected.
  • meta_has_allowed_keys: Check whether the resource's meta config contains only allowed keys.
  • meta_has_required_keys: Check whether the resource's meta config contains all required keys.
  • tags_have_allowed_values: Check whether the given resource has properties set in an appropriate properties file.
  • tags_have_required_values: Check whether the given resource has properties set in an appropriate properties file.

Source Columns

Filters

  • meta: Check whether a given resource has any matching meta to the accepted_values.
  • name: Check whether a given item has a valid name.

Enforcements

Macros

Filters

  • name: Check whether a given item has a valid name.
  • paths: Check whether a given item has a valid path.

Enforcements

  • has_description: Check whether the given resource has a description set.
  • has_properties: Check whether the given resource has properties set in an appropriate properties file.

Macro Arguments

Filters

  • name: Check whether a given item has a valid name.

Enforcements

  • has_description: Check whether the given resource has a description set.
  • has_type: Check whether the given argument has its type set in an appropriate properties file.

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

dbt_contracts-0.1.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

dbt_contracts-0.1.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file dbt_contracts-0.1.0.tar.gz.

File metadata

  • Download URL: dbt_contracts-0.1.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for dbt_contracts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c81f0197133684eceb7f9355f6d9b06c48179f8e6555c8e2697d60653060f861
MD5 5462964203bb2b7739aa7053b5875e15
BLAKE2b-256 26272278307c54ffceb6e51fa17f3e2345d24113681ecab2d3c91001e17388d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_contracts-0.1.0.tar.gz:

Publisher: deploy.yml on geo-martino/dbt-contracts

Attestations:

File details

Details for the file dbt_contracts-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_contracts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adbcf8947a27ddf021306b3d048ef2797994ef2d04be458067622fdcfc4a8418
MD5 fae93fcf5bac54d90c0f92e532d0e7f6
BLAKE2b-256 c4b91a0353c0de08c57e241c867c7e79c8383c1e7c0b67e9d80907828a721cf8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_contracts-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on geo-martino/dbt-contracts

Attestations:

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