dbt-common

1.37.3 · active · verified Sat Mar 28

dbt-common is a Python library that provides shared common utilities used by dbt-core and various dbt adapter implementations. It centralizes functionalities to ensure consistency and efficiency across the dbt ecosystem. The library is actively maintained by dbt Labs, with a current version of 1.37.3, and typically follows the release cadence of `dbt-core` and related adapter packages.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `dbt_common` library and access its version. It also shows how to import and catch a base exception class, `DbtCommonError`, which is part of its utilities, illustrating basic programmatic interaction. Note that `dbt-common` is primarily an internal utility for `dbt-core` and adapters, so direct end-user application development with it is rare.

import dbt_common
from dbt_common.exceptions import DbtCommonError

print(f"dbt-common version: {dbt_common.__version__}")

try:
    raise DbtCommonError("This is a dbt common error.")
except DbtCommonError as e:
    print(f"Caught expected error: {e}")

view raw JSON →