From a58e694491a3df955169a7dfe1cd204abf3b319b Mon Sep 17 00:00:00 2001 From: Niels <77604434+nielsmai@users.noreply.github.com> Date: Tue, 30 May 2023 15:50:21 -0400 Subject: [PATCH] post_process fix Added the post_process fix to companies and contacts --- tap_hubspot/streams.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tap_hubspot/streams.py b/tap_hubspot/streams.py index 6325274..7b4d03e 100644 --- a/tap_hubspot/streams.py +++ b/tap_hubspot/streams.py @@ -98,6 +98,11 @@ def get_child_context(self, record: dict, context: Optional[dict]) -> dict: """Return a context dictionary for child streams.""" return {"archived": record["archived"], "company_id": record["id"]} + def post_process(self, row: dict, context: Optional[dict]) -> dict: + """As needed, append or transform raw data to match expected structure. + Returns row""" + return row + class DealsStream(HubspotStream): """Define custom stream.""" @@ -160,6 +165,11 @@ def get_child_context(self, record: dict, context: Optional[dict]) -> dict: """Return a context dictionary for child streams.""" return {"archived": record["archived"], "contact_id": record["id"]} + def post_process(self, row: dict, context: Optional[dict]) -> dict: + """As needed, append or transform raw data to match expected structure. + Returns row""" + return row + class PropertiesStream(HubspotStream): """Define custom stream."""