mirror of
https://gitlab.com/cief-data/data-management.git
synced 2026-08-19 04:13:57 +00:00
change route format
This commit is contained in:
@@ -11,8 +11,8 @@ def exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH):
|
|||||||
EXCHANGE_CSV_TEMP_STORAGE_PATH = EXCHANGE_CSV_TEMP_STORAGE_PATH
|
EXCHANGE_CSV_TEMP_STORAGE_PATH = EXCHANGE_CSV_TEMP_STORAGE_PATH
|
||||||
|
|
||||||
#Read config file
|
#Read config file
|
||||||
EX_MYSQL_CONFIG = general_function.read_json_file("config/",EX_MYSQL_CONFIG_FILE)
|
EX_MYSQL_CONFIG = general_function.read_json_file("/config/",EX_MYSQL_CONFIG_FILE)
|
||||||
EX_SQL_DICT = general_function.read_json_file("config/",EX_SQL_FILE)
|
EX_SQL_DICT = general_function.read_json_file("/config/",EX_SQL_FILE)
|
||||||
|
|
||||||
#Connect to mysql
|
#Connect to mysql
|
||||||
EX_MYSQLDB = ex_extract_func.connect_mysql(EX_MYSQL_CONFIG)
|
EX_MYSQLDB = ex_extract_func.connect_mysql(EX_MYSQL_CONFIG)
|
||||||
@@ -23,7 +23,7 @@ def exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH):
|
|||||||
|
|
||||||
def exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH):
|
def exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH):
|
||||||
#Config file name
|
#Config file name
|
||||||
CLOUDSTORAGE_CREDENTIAL_FILE = "config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json"
|
CLOUDSTORAGE_CREDENTIAL_FILE = "/config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json"
|
||||||
|
|
||||||
#Connect to cloudstorage
|
#Connect to cloudstorage
|
||||||
ex_storage_client = ex_load_func.login_cloudstorage_credential(CLOUDSTORAGE_CREDENTIAL_FILE)
|
ex_storage_client = ex_load_func.login_cloudstorage_credential(CLOUDSTORAGE_CREDENTIAL_FILE)
|
||||||
@@ -41,11 +41,11 @@ def exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
#Extract Load Exchange Data, and delete the temp csv
|
#Extract Load Exchange Data, and delete the temp csv
|
||||||
EXCHANGE_CSV_TEMP_STORAGE_PATH = "exchange/extract/exchange_temp_extract_csv/"
|
EXCHANGE_CSV_TEMP_STORAGE_PATH = "/exchange/extract/exchange_temp_extract_csv/"
|
||||||
exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
||||||
exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
exchange_load_to_cloudstorage(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
||||||
general_function.delete_csv_in_path(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
general_function.delete_csv_in_path(EXCHANGE_CSV_TEMP_STORAGE_PATH)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user