Skip to content

Commit

Permalink
Disable json serde
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 29, 2023
1 parent f02809e commit 65645ac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tap_athena/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

import typing as t

import sqlalchemy
from singer_sdk import SQLConnector, SQLStream

if t.TYPE_CHECKING:
from sqlalchemy.engine import Engine


class AthenaConnector(SQLConnector):
"""The connector for SQLite.
Expand Down Expand Up @@ -34,6 +38,17 @@ def get_sqlalchemy_url(self, config: dict[str, t.Any]) -> str:
f"schema={config['schema_name']}"
)

def create_engine(self) -> Engine:
"""Create a SQLAlchemy engine."""
return sqlalchemy.create_engine(
self.sqlalchemy_url,
echo=False,
# TODO: Enable JSON serialization/deserialization.
# https://github.com/MeltanoLabs/tap-athena/issues/35
# json_serializer=self.serialize_json,
# json_deserializer=self.deserialize_json,
)


class AthenaStream(SQLStream):
"""The Stream class for Athena."""
Expand Down

0 comments on commit 65645ac

Please sign in to comment.