From 10e2ddb694af6262afd9d4bfa278e3d3d0e431b2 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Thu, 4 Dec 2025 16:21:04 +0000 Subject: [PATCH] updated first time script --- etl/hubSpotClient/hubspotClient.py | 1 + .../scripts/hubspot_abri_etl_first_time.py | 1 + etl/hubSpotClient/scripts/hubspot_company.py | 17 ++++++++++------- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/etl/hubSpotClient/hubspotClient.py b/etl/hubSpotClient/hubspotClient.py index 2168217..ca26f87 100644 --- a/etl/hubSpotClient/hubspotClient.py +++ b/etl/hubSpotClient/hubspotClient.py @@ -14,6 +14,7 @@ class Companies(Enum): ABRI = "237615001799" SOUTHERN_HOUSING_GROUP = "109343619305" LIVEWEST = "86205872354" + SURESERVE = "301745289413" class DealStage(Enum): SURVEYED_COMPLETE_NEEDS_SIGN_OFF = "1617223914" diff --git a/etl/hubSpotClient/scripts/hubspot_abri_etl_first_time.py b/etl/hubSpotClient/scripts/hubspot_abri_etl_first_time.py index 0539f58..075d76f 100644 --- a/etl/hubSpotClient/scripts/hubspot_abri_etl_first_time.py +++ b/etl/hubSpotClient/scripts/hubspot_abri_etl_first_time.py @@ -10,6 +10,7 @@ companies = [ Companies.ABRI, Companies.LIVEWEST, Companies.SOUTHERN_HOUSING_GROUP, + Companies.SURESERVE ] # Track all failures and summary data diff --git a/etl/hubSpotClient/scripts/hubspot_company.py b/etl/hubSpotClient/scripts/hubspot_company.py index 2e55b76..8d14e2d 100644 --- a/etl/hubSpotClient/scripts/hubspot_company.py +++ b/etl/hubSpotClient/scripts/hubspot_company.py @@ -4,12 +4,15 @@ from etl.db.hubSpotLoad import HubspotTodb hubspot = HubSpotClient() +companies = [ + Companies.ABRI, + Companies.LIVEWEST, + Companies.SOUTHERN_HOUSING_GROUP, + Companies.SURESERVE, +] # All deals from a pipeline_id via filter -company = hubspot.get_company_information(Companies.SOUTHERN_HOUSING_GROUP.value) - -loader = HubspotTodb() -loader.new_record_company(company) - - -# make a scrip that updates table, with khalim scoping +for comapny in companies: + new_company_info = hubspot.get_company_information(company.value) + loader = HubspotTodb() + loader.new_record_company(new_company_info) \ No newline at end of file