diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 9a95cd21..bd2c6c99 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -77,9 +77,12 @@ class DataLoader: ) ) + # Add in asset_list_row_id + asset_list["asset_list_row_id"] = [ha_name + str(i) for i in range(0, len(asset_list))] + return asset_list - def load_survey_list(self, file_path, ha_name, sheet_name=None): + def load_survey_list(self, file_path, ha_name, asset_list, sheet_name=None): survey_workbook = openpyxl.load_workbook(file_path) if sheet_name is not None: survey_sheet = survey_workbook[sheet_name] @@ -133,8 +136,22 @@ class DataLoader: ) ) + # Add in asset_list_row_id + survey_list["survey_list_row_id"] = [ha_name + str(i) for i in range(0, len(survey_list))] + + # We now do the matching between the asset list and the survey list. + # What we'll get from this is a lookup table from the asset list to the survey list + + if ha_name == "ha_6": + self.merge_ha_6(asset_list, survey_list) + else: + raise NotImplementedError("Only HA 6 has surveys") + return survey_list + def merge_ha_6(self, asset_list, survey_list): + pass + def load(self): data = {}