Skip to content

Commit

Permalink
retrying strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jlloyd-widen committed Feb 26, 2024
1 parent 21563b9 commit f41ec18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 4 additions & 0 deletions tap_orca/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
23 changes: 12 additions & 11 deletions tap_orca/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit f41ec18

Please sign in to comment.