Check directory function

This commit is contained in:
Yam ZhengLim
2022-09-26 01:07:13 +08:00
parent 6f137bc88d
commit 6a19a4ee59
+11
View File
@@ -38,8 +38,19 @@ def exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH):
file_path = os.path.join(dirpath,file_name)
ex_load_func.upload_to_bucket(ex_storage_client, file_name, file_path)
def print_check_directory():
script_dir = os.path.dirname(os.path.realpath(__file__))
print (os.getcwd())
print(script_dir)
os.chdir(script_dir)
print (os.getcwd())
def main():
#### CHECK DIRECTORY ####
print_check_directory()
###########################
#Extract Load Exchange Data, and delete the temp csv
EXCHANGE_CSV_TEMP_STORAGE_PATH = "./exchange/extract/exchange_temp_extract_csv/"
exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH)