Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
fix(mysql): add odd_metadata property to Column entity: (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vixtir authored Sep 4, 2023
1 parent 1658dcc commit 423b557
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
8 changes: 7 additions & 1 deletion odd_collector/models/column.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from dataclasses import dataclass, field
from typing import Any, Optional

from odd_collector_sdk.utils.metadata import HasMetadata


@dataclass(frozen=True)
class Column:
class Column(HasMetadata):
table_catalog: str
table_schema: str
table_name: str
Expand All @@ -15,3 +17,7 @@ class Column:
is_primary_key: bool = False
is_sort_key: bool = False
metadata: dict[str, Any] = field(default_factory=dict)

@property
def odd_metadata(self):
return self.metadata
4 changes: 3 additions & 1 deletion odd_collector/models/table.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import dataclasses
from typing import Any, Optional

from odd_collector_sdk.utils.metadata import HasMetadata

from odd_collector.helpers.datetime import Datetime

from .column import Column


@dataclasses.dataclass
class Table:
class Table(HasMetadata):
catalog: str
schema: str
name: str
Expand Down
40 changes: 28 additions & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ llvmlite = "^0.39.1"
numba = "^0.56.4"
mlflow = "^2.2.2"
sql-metadata = "^2.6.0"
odd-collector-sdk = "^0.3.42"
odd-collector-sdk = "^0.3.43"
clickhouse-connect = "^0.5.14"
odd-models = "^2.0.28"
couchbase = "^4.1.3"
Expand Down

0 comments on commit 423b557

Please sign in to comment.