Skip to content

Commit

Permalink
feat: de-nest properties (#57)
Browse files Browse the repository at this point in the history
* denest properties

* Update tap_hubspot/client.py

Co-authored-by: Edgar Ramírez Mondragón <[email protected]>

---------

Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
  • Loading branch information
pnadolny13 and edgarrmondragon authored Nov 16, 2023
1 parent 3c53e5c commit 67066c7
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 210 deletions.
20 changes: 20 additions & 0 deletions tap_hubspot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,23 @@ def get_url_params(
params["order_by"] = self.replication_key

return params

def post_process(
self,
row: dict,
context: dict | None = None, # noqa: ARG002
) -> dict | None:
"""Post process row.
Args:
row: Row from response.
context: Stream sync context.
Returns:
Transformed row.
"""
if "properties" in row:
properties = row.pop("properties")
for key, value in properties.items():
row[key] = value
return row
Loading

0 comments on commit 67066c7

Please sign in to comment.