diff --git a/core/dbt/artifacts/schemas/catalog/__init__.py b/core/dbt/artifacts/schemas/catalog/__init__.py index 1123f801adf..185b4946d25 100644 --- a/core/dbt/artifacts/schemas/catalog/__init__.py +++ b/core/dbt/artifacts/schemas/catalog/__init__.py @@ -1,2 +1,3 @@ # alias to latest from dbt.artifacts.schemas.catalog.v1.catalog import * # noqa +from dbt_common.contracts.metadata import StatsDict, StatsItem, TableMetadata diff --git a/core/dbt/artifacts/schemas/catalog/v1/catalog.py b/core/dbt/artifacts/schemas/catalog/v1/catalog.py index d6d02608bca..ca78e4e09ba 100644 --- a/core/dbt/artifacts/schemas/catalog/v1/catalog.py +++ b/core/dbt/artifacts/schemas/catalog/v1/catalog.py @@ -7,6 +7,7 @@ BaseArtifactMetadata, schema_version, ) +from dbt_common.contracts.metadata import StatsDict, TableMetadata from dbt_common.dataclass_schema import dbtClassMixin from dbt_common.utils.formatting import lowercase @@ -18,18 +19,6 @@ ) -@dataclass -class StatsItem(dbtClassMixin): - id: str - label: str - value: Primitive - include: bool - description: Optional[str] = None - - -StatsDict = Dict[str, StatsItem] - - @dataclass class ColumnMetadata(dbtClassMixin): type: str @@ -41,16 +30,6 @@ class ColumnMetadata(dbtClassMixin): ColumnMap = Dict[str, ColumnMetadata] -@dataclass -class TableMetadata(dbtClassMixin): - type: str - schema: str - name: str - database: Optional[str] = None - comment: Optional[str] = None - owner: Optional[str] = None - - @dataclass class CatalogTable(dbtClassMixin): metadata: TableMetadata diff --git a/core/setup.py b/core/setup.py index e133b946fa4..f28a47e0814 100644 --- a/core/setup.py +++ b/core/setup.py @@ -71,7 +71,7 @@ "minimal-snowplow-tracker>=0.0.2,<0.1", "dbt-semantic-interfaces>=0.5.1,<0.6", # Minor versions for these are expected to be backwards-compatible - "dbt-common>=1.1.0,<2.0", + "dbt-common>=1.2.0,<2.0", "dbt-adapters>=1.1.1,<2.0", # ---- # Expect compatibility with all new versions of these packages, so lower bounds only.