2 Commity f2afa31b95 ... f174033001

Autor SHA1 Wiadomość Data
  Ping f174033001 add requirements.txt 1 rok temu
  Ping b7a3b22e24 print env in utils instead of etl 1 rok temu
4 zmienionych plików z 29 dodań i 4 usunięć
  1. 1 3
      etl_bill_detail.py
  2. 0 1
      etl_utility.py
  3. 26 0
      requirements.txt
  4. 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_'
 

+ 26 - 0
requirements.txt

@@ -0,0 +1,26 @@
+certifi==2023.7.22
+charset-normalizer==3.3.1
+coverage==7.3.2
+exceptiongroup==1.1.3
+idna==3.4
+iniconfig==2.0.0
+iso8601==1.0.2
+numpy==1.26.1
+packaging==23.2
+pandas==2.1.1
+pluggy==1.3.0
+PyMySQL==1.1.0
+pytest==7.4.3
+pytest-cov==4.1.0
+python-dateutil==2.8.2
+pytz==2023.3.post1
+PyYAML==6.0.1
+requests==2.31.0
+six==1.16.0
+SQLAlchemy==2.0.22
+taospy==2.7.12
+tomli==2.0.1
+tqdm==4.66.1
+typing_extensions==4.8.0
+tzdata==2023.3
+urllib3==2.0.7

+ 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]