From 2a35cccd8a6e38e0098980d57b05a2ecfc981681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Tue, 8 Aug 2023 17:55:30 -0600 Subject: [PATCH 1/2] fix: Work around unsupported `json_serializer` and `json_deserializer` --- tap_snowflake/client.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tap_snowflake/client.py b/tap_snowflake/client.py index 0e4c375..fd6e417 100644 --- a/tap_snowflake/client.py +++ b/tap_snowflake/client.py @@ -68,17 +68,11 @@ def get_sqlalchemy_url(cls, config: dict) -> str: return URL(**params) - def create_sqlalchemy_engine(self) -> sqlalchemy.engine.Engine: - """Return a new SQLAlchemy engine using the provided config. - - Developers can generally override just one of the following: - `sqlalchemy_engine`, sqlalchemy_url`. - - Returns: - A newly created SQLAlchemy engine object. - """ + def create_engine(self) -> sqlalchemy.engine.Engine: return sqlalchemy.create_engine( - self.sqlalchemy_url, echo=False, pool_timeout=10 + self.sqlalchemy_url, + echo=False, + pool_timeout=10, ) # overridden to filter out the information_schema from catalog discovery From e5af6932ed06c16aa277f790afa2ec418b0238b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Tue, 8 Aug 2023 17:59:55 -0600 Subject: [PATCH 2/2] Add missing docstring --- tap_snowflake/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tap_snowflake/client.py b/tap_snowflake/client.py index fd6e417..977c8d6 100644 --- a/tap_snowflake/client.py +++ b/tap_snowflake/client.py @@ -69,6 +69,11 @@ def get_sqlalchemy_url(cls, config: dict) -> str: return URL(**params) def create_engine(self) -> sqlalchemy.engine.Engine: + """Create SQLAlchemy engine instance. + + Returns: + A SQLAlchemy engine. + """ return sqlalchemy.create_engine( self.sqlalchemy_url, echo=False,