From bdd3462e99024caf5f6a7925bdefb237791bcb15 Mon Sep 17 00:00:00 2001 From: dominic Date: Thu, 27 Feb 2020 12:04:09 +0000 Subject: [PATCH] Update load_csv_to_staging.py Updates to bring staging script into line with main upload script - Script was not working --- etl/join_building_data/load_csv_to_staging.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etl/join_building_data/load_csv_to_staging.py b/etl/join_building_data/load_csv_to_staging.py index 413cd533..1b61e90d 100644 --- a/etl/join_building_data/load_csv_to_staging.py +++ b/etl/join_building_data/load_csv_to_staging.py @@ -61,6 +61,11 @@ def update_building(building_id, data, api_key, base_url): def find_building(data, base_url): + if 'building_id' in data: + building_id = data['building_id'] + if building_id is not None: + print("match_by_building_id", building_id) + return building_id if 'toid' in data: building_id = find_by_reference(base_url, 'toid', data['toid']) if building_id is not None: