{"id":627,"library":"dbt-common","title":"dbt-common","description":"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.","status":"active","version":"1.37.3","language":"python","source_language":"en","source_url":"https://github.com/dbt-labs/dbt-common.git","tags":["dbt","utility","common","library","etl","data-transformation"],"install":[{"cmd":"pip install dbt-common","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for file path matching and handling.","package":"pathspec"},{"reason":"Likely for object serialization/deserialization.","package":"mashumaro"},{"reason":"For cross-platform colored terminal output.","package":"colorama"},{"reason":"For ISO 8601 date/time parsing and formatting.","package":"isodate"},{"reason":"For Protocol Buffers definitions used in dbt communication and artifacts.","package":"dbt-protos"},{"reason":"For deep comparison of data structures.","package":"deepdiff"},{"reason":"Core templating engine used throughout dbt, including for SQL generation.","package":"jinja2"},{"reason":"For robust date/time parsing and manipulation.","package":"python-dateutil"},{"reason":"A lightweight table-oriented data analysis library, potentially for internal data handling.","package":"agate"},{"reason":"For backporting features from newer `typing` modules to older Python versions.","package":"typing-extensions"},{"reason":"For validating JSON data against schemas, crucial for dbt artifacts.","package":"jsonschema"},{"reason":"Google's Protocol Buffers for data serialization.","package":"protobuf"},{"reason":"For making HTTP requests, common in various utility functions.","package":"requests"}],"imports":[{"wrong":"import dbt_common; print(dbt_common.__version__)","symbol":"__version__","correct":"import dbt_common; print(dbt_common.__version__)"}],"quickstart":{"code":"import dbt_common\nfrom dbt_common.exceptions import DbtCommonError\n\nprint(f\"dbt-common version: {dbt_common.__version__}\")\n\ntry:\n    raise DbtCommonError(\"This is a dbt common error.\")\nexcept DbtCommonError as e:\n    print(f\"Caught expected error: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"Refer to the `dbt-core` release notes and migration guides for adapter developers. Update your adapter implementations to align with the new Python interfaces exposed or used by `dbt-common`.","message":"Major versions of `dbt-core` (e.g., v1 to v2) may include breaking changes that impact `dbt-common` and its consumers, particularly adapter plugins and custom implementations that rely on dbt's internal Python interfaces. These changes are typically communicated in dbt's release notes for adapter maintainers.","severity":"breaking","affected_versions":"All major version upgrades of `dbt-core` (e.g., 1.x.x to 2.x.x)"},{"fix":"Ensure your tools or integrations parsing dbt artifacts are updated to handle the new schema versions. Monitor dbt Developer Hub for detailed artifact schema changes.","message":"Changes to dbt's metadata interfaces, including artifacts (like `manifest.json`, `catalog.json`) and structured logging, are considered breaking for `dbt-common`'s consumers if fields are deleted, renamed, or their types/defaults change without backward compatibility.","severity":"breaking","affected_versions":"Any minor or major version where metadata interface versions are bumped (e.g., dbt Core v1.x.x to v1.y.x or v2.x.x)."},{"fix":"Update any custom environment variables currently using the `DBT_` prefix to a different, non-colliding prefix, or ensure they do not conflict with dbt's internal `DBT_ENGINE` variables.","message":"The `DBT_` environment variable prefix has been deprecated for custom variables to prevent collisions with dbt's internal variables. New dbt environment variables are now prefixed with `DBT_ENGINE`.","severity":"deprecated","affected_versions":"dbt Core v1.10 onwards, impacting users with custom `DBT_` prefixed environment variables."},{"fix":"When using dbt, interact primarily with `dbt-core` or specific adapters. If you are developing a dbt adapter or extending `dbt-core`, refer to the `dbt-common` source code and dbt Labs' developer guides for internal API usage.","message":"`dbt-common` is a foundational library, not typically intended for direct end-user application development. Its utilities are primarily consumed by `dbt-core` and dbt adapter implementations. Expect minimal direct documentation for independent usage.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.37.3':51 'across':34 'activ':41 'adapt':24,64 'cadenc':57 'central':27 'common':3,6,14,68 'consist':31 'core':20,61 'current':48 'data':72 'data-transform':71 'dbt':2,5,19,23,36,44,60,66 'dbt-common':1,4 'dbt-core':18,59 'ecosystem':37 'effici':33 'ensur':30 'etl':70 'follow':54 'function':28 'implement':25 'lab':45 'librari':10,39,69 'maintain':42 'packag':65 'provid':12 'python':9 'relat':63 'releas':56 'share':13 'transform':73 'typic':53 'use':16 'util':15,67 'various':22 'version':49","created_at":"2026-03-28T17:07:52.137676+00:00","updated_at":"2026-04-16T05:44:23.137327+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nAttributeError: module 'dbt_common' has no attribute '__version__'"},"ecosystem":"pypi","meta_description":null,"install_score":0,"quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"1.39.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://www.getdbt.com","github":"https://github.com/dbt-labs/dbt-common","docs":null,"changelog":"https://github.com/dbt-labs/dbt-common/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/dbt-common/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-27","next_check":"2026-07-10","install_tag":"stale"}}