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

Commit

Permalink
post_process fix
Browse files Browse the repository at this point in the history
Added the post_process fix to companies and contacts
  • Loading branch information
nielsmai committed May 30, 2023
1 parent 1077098 commit a58e694
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 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 @@ -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."""
Expand Down

0 comments on commit a58e694

Please sign in to comment.