Skip to content

Commit

Permalink
Update FivetranWorkspace scaffold post review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Nov 5, 2024
1 parent db44adf commit 4dfe34d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from dagster_fivetran.experimental.resources import FivetranWorkspace as FivetranWorkspace
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from dagster._annotations import experimental
from dagster._config.pythonic_config import ConfigurableResource
from dagster._record import record
from dagster._serdes.serdes import whitelist_for_serdes
from dagster._utils.cached_method import cached_method
from pydantic import Field, PrivateAttr
from requests.auth import HTTPBasicAuth
Expand All @@ -18,6 +19,7 @@ class FivetranContentType(Enum):
DESTINATION = "destination"


@whitelist_for_serdes
@record
class FivetranContentData:
"""A record representing a piece of content in a Fivetran workspace.
Expand All @@ -27,16 +29,6 @@ class FivetranContentData:
content_type: FivetranContentType
properties: Mapping[str, Any]

def to_cached_data(self) -> Mapping[str, Any]:
return {"content_type": self.content_type.value, "properties": self.properties}

@classmethod
def from_cached_data(cls, data: Mapping[Any, Any]) -> "FivetranContentData":
return cls(
content_type=FivetranContentType(data["content_type"]),
properties=data["properties"],
)


@record
class FivetranWorkspaceData:
Expand Down

This file was deleted.

0 comments on commit 4dfe34d

Please sign in to comment.