From 20ef8805bdddd755b19a99ea219dfc9506293e7e Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Wed, 29 May 2024 16:47:09 +0100 Subject: [PATCH] Only remove StatsItem, StatsDict, TableMetadata --- .../dbt/artifacts/schemas/catalog/__init__.py | 1 + .../artifacts/schemas/catalog/v1/catalog.py | 23 +------------------ core/dbt/version/__init__.py | 1 - 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 core/dbt/version/__init__.py diff --git a/core/dbt/artifacts/schemas/catalog/__init__.py b/core/dbt/artifacts/schemas/catalog/__init__.py index 1123f801adf..5a5159611b2 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.artifacts.catalog import StatsDict, StatsItem, TableMetadata # noqa diff --git a/core/dbt/artifacts/schemas/catalog/v1/catalog.py b/core/dbt/artifacts/schemas/catalog/v1/catalog.py index d6d02608bca..90e387223b7 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.artifacts.catalog 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/dbt/version/__init__.py b/core/dbt/version/__init__.py deleted file mode 100644 index a1034ae851d..00000000000 --- a/core/dbt/version/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from dbt_common.version import * # noqa