diff --git a/CLOUD_STORAGE_ADMIN_CREDENTIAL.json b/config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json similarity index 99% rename from CLOUD_STORAGE_ADMIN_CREDENTIAL.json rename to config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json index a23a669..2940b13 100644 --- a/CLOUD_STORAGE_ADMIN_CREDENTIAL.json +++ b/config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json @@ -10,3 +10,4 @@ "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/cloud-storage-admin-service-ac%40data-management-359208.iam.gserviceaccount.com" } + diff --git a/EXCHANGE_CONFIG.json b/config/EXCHANGE_CONFIG.json similarity index 100% rename from EXCHANGE_CONFIG.json rename to config/EXCHANGE_CONFIG.json diff --git a/EXCHANGE_EXTRACT_SQL.json b/config/EXCHANGE_EXTRACT_SQL.json similarity index 100% rename from EXCHANGE_EXTRACT_SQL.json rename to config/EXCHANGE_EXTRACT_SQL.json diff --git a/main.py b/main.py index fa4eb76..c881c2e 100644 --- a/main.py +++ b/main.py @@ -11,8 +11,8 @@ def exchange_extract(EXCHANGE_CSV_TEMP_STORAGE_PATH): EXCHANGE_CSV_TEMP_STORAGE_PATH = EXCHANGE_CSV_TEMP_STORAGE_PATH #Read config file - EX_MYSQL_CONFIG = general_function.read_json_file("",EX_MYSQL_CONFIG_FILE) - EX_SQL_DICT = general_function.read_json_file("",EX_SQL_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) #Connect to mysql 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): #Config file name - CLOUDSTORAGE_CREDENTIAL_FILE = "CLOUD_STORAGE_ADMIN_CREDENTIAL.json" + CLOUDSTORAGE_CREDENTIAL_FILE = "./config/CLOUD_STORAGE_ADMIN_CREDENTIAL.json" #Connect to cloudstorage ex_storage_client = ex_load_func.login_cloudstorage_credential(CLOUDSTORAGE_CREDENTIAL_FILE)