From 04fd6b4f1b7a198fde9788dcfb91917dc52136fb Mon Sep 17 00:00:00 2001 From: Vinicius Mesel <4984147+vmesel@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:39:57 -0300 Subject: [PATCH] Adds list_id on list_memberships --- tap_hubspot_beta/streams.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tap_hubspot_beta/streams.py b/tap_hubspot_beta/streams.py index db19347..06a972c 100644 --- a/tap_hubspot_beta/streams.py +++ b/tap_hubspot_beta/streams.py @@ -904,11 +904,17 @@ class ListMembershipV3Stream(hubspotV3Stream): path = "crm/v3/lists/{list_id}/memberships" records_jsonpath = "$[*]" parent_stream_type = ListSearchV3Stream + primary_keys = ["list_id"] schema = th.PropertiesList( th.Property("results", th.CustomType({"type": ["array", "string"]})), + th.Property("list_id", th.IntegerType), ).to_dict() + def post_process(self, row, context): + row = super().post_process(row, context) + row["list_id"] = context["list_id"] + return row class AssociationDealsStream(hubspotV4Stream):