diff --git a/tap_orca/client.py b/tap_orca/client.py index 6236cb1..a488ed1 100644 --- a/tap_orca/client.py +++ b/tap_orca/client.py @@ -64,3 +64,7 @@ def get_new_paginator(self) -> BaseAPIPaginator: A paginator instance. """ return BaseOffsetPaginator(0, self.page_size) + + def post_process(self, row: dict, context: dict) -> dict: + """Post-process the record before writing it.""" + return {k: str(v) for k, v in row.items()} diff --git a/tap_orca/tap.py b/tap_orca/tap.py index ed5f564..5e164e6 100644 --- a/tap_orca/tap.py +++ b/tap_orca/tap.py @@ -104,17 +104,18 @@ def discover_schema(self, query: str) -> dict: schema.append( th.Property( key, - th.CustomType(jsonschema_type_dict={ - "anyOf": [ - {"type": "null"}, - {"type": "object"}, - {"type": "array"}, - {"type": "string"}, - {"type": "number"}, - # {"type": "boolean"}, # causes all values to be a boolean - {"type": "integer"}, - ] - }) + th.StringType(), + # th.CustomType(jsonschema_type_dict={ + # "anyOf": [ + # {"type": "null"}, + # {"type": "object"}, + # {"type": "array"}, + # {"type": "string"}, + # {"type": "number"}, + # # {"type": "boolean"}, # causes all values to be a boolean + # {"type": "integer"}, + # ] + # }) ), ) self.logger.info("Schema discovery complete.")