Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #58 from potloc/DE-1706-testing-removing-post_process
Browse files Browse the repository at this point in the history
DE-1706 Testing removing post_process
  • Loading branch information
nielsmai authored May 30, 2023
2 parents b8f21dd + a58e694 commit 043bf25
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tap_hubspot/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -128,6 +133,11 @@ def get_child_context(self, record: dict, context: Optional[dict]) -> dict:
"deal_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 ContactsStream(HubspotStream):
"""Define custom stream."""
Expand Down Expand Up @@ -155,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."""
Expand Down

0 comments on commit 043bf25

Please sign in to comment.