diff --git a/python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/__init__.py b/python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/__init__.py new file mode 100644 index 0000000000000..e06302e5a4e26 --- /dev/null +++ b/python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/__init__.py @@ -0,0 +1 @@ +from dagster_fivetran.experimental.resources import FivetranWorkspace as FivetranWorkspace diff --git a/python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/resources.py b/python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/resources.py similarity index 92% rename from python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/resources.py rename to python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/resources.py index cb571555d02c7..c1be8948a9aee 100644 --- a/python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/resources.py +++ b/python_modules/libraries/dagster-fivetran/dagster_fivetran/experimental/resources.py @@ -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 @@ -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. @@ -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: diff --git a/python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/__init__.py b/python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/__init__.py deleted file mode 100644 index 66e023029ea1e..0000000000000 --- a/python_modules/libraries/dagster-fivetran/dagster_fivetran/v2/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from dagster_fivetran.v2.resources import FivetranWorkspace as FivetranWorkspace