diff --git a/main.py b/main.py index b2e16be..86e4ee0 100644 --- a/main.py +++ b/main.py @@ -159,31 +159,31 @@ def c2m_load_to_cloudstorage(C2M_FILES_TEMP_STORAGE_PATH): def main(): print("RUNNING MAIN_PY") - # # Exchange - # #Make sure cron in the file directory - # general_function.change_to_current_directory() - # #Extract Load Exchange Data - # EXCHANGE_CSV_TEMP_STORAGE_PATH = "./exchange/extract/exchange_temp_extract_csv/" - # print("STARTING EXCHANGE EXTRACT") - # exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH) - # print("STARTING EXCHANGE LOAD") - # exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH) - # #Delete Temp CSV - # print("DELETING EXCHANGE CSV") - # general_function.delete_csv_in_path(EXCHANGE_CSV_TEMP_STORAGE_PATH) + # Exchange + #Make sure cron in the file directory + general_function.change_to_current_directory() + #Extract Load Exchange Data + EXCHANGE_CSV_TEMP_STORAGE_PATH = "./exchange/extract/exchange_temp_extract_csv/" + print("STARTING EXCHANGE EXTRACT") + exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH) + print("STARTING EXCHANGE LOAD") + exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH) + #Delete Temp CSV + print("DELETING EXCHANGE CSV") + general_function.delete_csv_in_path(EXCHANGE_CSV_TEMP_STORAGE_PATH) - # # Shipping - # #Make sure cron in the file directory - # general_function.change_to_current_directory() - # #Extract Load SHIPPING Data - # SHIPPING_CSV_TEMP_STORAGE_PATH = "./shipping/extract/shipping_temp_extract_csv/" - # print("STARTING SHIPPING EXTRACT") - # shipping_extract(SHIPPING_CSV_TEMP_STORAGE_PATH) - # print("STARTING SHIPPING LOAD") - # shipping_load_to_cloudstorage(SHIPPING_CSV_TEMP_STORAGE_PATH) - # #Delete Temp CSV - # print("DELETING SHIPPING CSV") - # general_function.delete_csv_in_path(SHIPPING_CSV_TEMP_STORAGE_PATH) + # Shipping + #Make sure cron in the file directory + general_function.change_to_current_directory() + #Extract Load SHIPPING Data + SHIPPING_CSV_TEMP_STORAGE_PATH = "./shipping/extract/shipping_temp_extract_csv/" + print("STARTING SHIPPING EXTRACT") + shipping_extract(SHIPPING_CSV_TEMP_STORAGE_PATH) + print("STARTING SHIPPING LOAD") + shipping_load_to_cloudstorage(SHIPPING_CSV_TEMP_STORAGE_PATH) + #Delete Temp CSV + print("DELETING SHIPPING CSV") + general_function.delete_csv_in_path(SHIPPING_CSV_TEMP_STORAGE_PATH) # C2M #Make sure cron in the file directory @@ -198,21 +198,21 @@ def main(): print("DELETING SHIPPING CSV") general_function.delete_csv_or_png_in_path(C2M_FILES_TEMP_STORAGE_PATH) - # # CRISP - # #Make sure cron in the file directory - # general_function.change_to_current_directory() - # #Extract Load Exchange Data - # CRISP_CSV_TEMP_STORAGE_PATH = "./crisp/extract/crisp_temp_extract_csv/" - # print("STARTING CRISP EXTRACT") - # crisp_extract(CRISP_CSV_TEMP_STORAGE_PATH) - # print("STARTING CRISP LOAD") - # crisp_load_to_cloudstorage(CRISP_CSV_TEMP_STORAGE_PATH) - # #Delete Temp CSV - # print("DELETING CRISP CSV") - # general_function.delete_csv_in_path(CRISP_CSV_TEMP_STORAGE_PATH) + # CRISP + #Make sure cron in the file directory + general_function.change_to_current_directory() + #Extract Load Exchange Data + CRISP_CSV_TEMP_STORAGE_PATH = "./crisp/extract/crisp_temp_extract_csv/" + print("STARTING CRISP EXTRACT") + crisp_extract(CRISP_CSV_TEMP_STORAGE_PATH) + print("STARTING CRISP LOAD") + crisp_load_to_cloudstorage(CRISP_CSV_TEMP_STORAGE_PATH) + #Delete Temp CSV + print("DELETING CRISP CSV") + general_function.delete_csv_in_path(CRISP_CSV_TEMP_STORAGE_PATH) - # print("END MAIN_PY") - # print("------------------------------------------------------------------------------------------------") + print("END MAIN_PY") + print("------------------------------------------------------------------------------------------------") if True: main() \ No newline at end of file