Преглед изворни кода

print env in utils instead of etl

Ping пре 1 година
родитељ
комит
b7a3b22e24
3 измењених фајлова са 3 додато и 4 уклоњено
  1. 1 3
      etl_bill_detail.py
  2. 0 1
      etl_utility.py
  3. 2 0
      utils.py

+ 1 - 3
etl_bill_detail.py

@@ -208,7 +208,6 @@ def load(conn, df: pd.DataFrame, target_db) -> None:
 
 def etl():
     config = load_config('production')
-    print('config', config)
 
     target_db = 'bi_bill_detail_'
 
@@ -242,8 +241,7 @@ def etl():
 
             if debug:
                 print(data.head())
-            else:
-                load(conn, data, target_db)
+            load(conn, data, target_db)
 
 
 etl()

+ 0 - 1
etl_utility.py

@@ -320,7 +320,6 @@ def load(conn, df: pd.DataFrame, target_db) -> None:
 
 def etl():
     config = load_config('production')
-    print('config', config)
 
     target_db = 'bi_utility_'
 

+ 2 - 0
utils.py

@@ -8,6 +8,8 @@ def load_config(env='test'):
     """
     with open('config.yaml', 'r') as f:
         config = yaml.load(f, Loader=yaml.FullLoader)
+    
+    print('loading config for env: {}'.format(env))
     return config[env]