From 729cdecf9c465bb58994a61ce803c6971e687cdc Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 23 May 2025 14:34:42 +0000 Subject: [PATCH] sgec support --- etl/db/hubSpotLoad.py | 4 ++++ etl/hubspot_to_invoice_rewrite.py | 1 + etl/surveyPrice/surveyPrice.py | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/etl/db/hubSpotLoad.py b/etl/db/hubSpotLoad.py index f4989a0..c070e83 100644 --- a/etl/db/hubSpotLoad.py +++ b/etl/db/hubSpotLoad.py @@ -49,6 +49,8 @@ class HubspotTodb(): sp = SharePointScraper(SharePointInstaller.JJC) elif installer.upper() == "SCIS": sp = SharePointScraper(SharePointInstaller.SOUTH_COAST_INSULATION) + elif installer.upper() == "SGEC": + sp = SharePointScraper(SharePointInstaller.SGEC) else: sp = None @@ -80,6 +82,8 @@ class HubspotTodb(): return SharePointInstaller.JJC elif installer.upper() == "SCIS": return SharePointInstaller.SOUTH_COAST_INSULATION + elif installer.upper() == "SGEC": + return SharePointInstaller.SGEC else: return None diff --git a/etl/hubspot_to_invoice_rewrite.py b/etl/hubspot_to_invoice_rewrite.py index 0a616a5..448ef28 100644 --- a/etl/hubspot_to_invoice_rewrite.py +++ b/etl/hubspot_to_invoice_rewrite.py @@ -5,6 +5,7 @@ os.environ["SHAREPOINT_CLIENT_SECRET"] = "SOf8Q~-is4wdQiqvEEm9FlJQRAY9ELGaj5Qz-a os.environ["SHAREPOINT_TENANT_ID"] = "c3f7519c-2719-4547-af04-6da6cbfd8f8f" os.environ["SOUTH_COAST_INSULATION_SERVICE_SHAREPOINT_ID"] = "b5a51507-9427-4ee0-b03e-90ec7681e2d3" os.environ["JJC_SERVICE_SHAREPOINT_ID"] = "7fdd0485-bbf3-4b29-b30f-98c81c2a6284" +os.environ["SGEC_SERVICE_SHAREPOINT_ID"] = "52018e5c-3215-4fe4-a4e3-bbf0d0aa7cd9" # Local development # os.environ["DATABASE_URL"] = "postgresql://postgres:makingwarmhomes@db:5432/postgres" diff --git a/etl/surveyPrice/surveyPrice.py b/etl/surveyPrice/surveyPrice.py index 2f3521b..fa8e699 100644 --- a/etl/surveyPrice/surveyPrice.py +++ b/etl/surveyPrice/surveyPrice.py @@ -277,14 +277,14 @@ class SurveyPrice(): columns={ 'SHAREPOINT FLOOR_AREA_BANDING': 'FLOOR_AREA_BANDING', } - ) + ).reset_index(drop=True) hubspot_data = hubspot_data.rename( columns={ 'HUBSPOT_WETROOMS': 'NO_OF_WETROOMS', 'HUBSPOT_TRICKLE_VENT': 'TRICKLE_VENT', } - ) + ).reset_index(drop=True) merged_df = pd.concat([hubspot_data, survey_data], axis=1)