wcp-library 1.2.6__py3-none-any.whl → 1.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wcp_library/async_sql/oracle.py +3 -3
- wcp_library/async_sql/postgres.py +3 -3
- wcp_library/sql/oracle.py +3 -3
- wcp_library/sql/postgres.py +3 -3
- {wcp_library-1.2.6.dist-info → wcp_library-1.2.8.dist-info}/METADATA +1 -1
- {wcp_library-1.2.6.dist-info → wcp_library-1.2.8.dist-info}/RECORD +7 -7
- {wcp_library-1.2.6.dist-info → wcp_library-1.2.8.dist-info}/WHEEL +0 -0
wcp_library/async_sql/oracle.py
CHANGED
@@ -188,7 +188,7 @@ class AsyncOracleConnection(object):
|
|
188
188
|
return rows
|
189
189
|
|
190
190
|
@retry
|
191
|
-
async def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName, match_cols: list) -> None:
|
191
|
+
async def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName: str, match_cols: list) -> None:
|
192
192
|
"""
|
193
193
|
Remove matching data from the warehouse
|
194
194
|
|
@@ -198,13 +198,13 @@ class AsyncOracleConnection(object):
|
|
198
198
|
:return: None
|
199
199
|
"""
|
200
200
|
|
201
|
-
|
201
|
+
df = dfObj[match_cols]
|
202
202
|
param_list = []
|
203
203
|
for column in match_cols:
|
204
204
|
param_list.append(f"{column} = :{column}")
|
205
205
|
params = ' AND '.join(param_list)
|
206
206
|
|
207
|
-
main_dict =
|
207
|
+
main_dict = df.to_dict('records')
|
208
208
|
query = f"""DELETE FROM {outputTableName} WHERE {params}"""
|
209
209
|
await self.execute_many(query, main_dict)
|
210
210
|
|
@@ -171,7 +171,7 @@ class AsyncPostgresConnection(object):
|
|
171
171
|
return rows
|
172
172
|
|
173
173
|
@retry
|
174
|
-
async def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName, match_cols: list) -> None:
|
174
|
+
async def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName: str, match_cols: list) -> None:
|
175
175
|
"""
|
176
176
|
Remove matching data from the warehouse
|
177
177
|
|
@@ -181,13 +181,13 @@ class AsyncPostgresConnection(object):
|
|
181
181
|
:return: None
|
182
182
|
"""
|
183
183
|
|
184
|
-
|
184
|
+
df = dfObj[match_cols]
|
185
185
|
param_list = []
|
186
186
|
for column in match_cols:
|
187
187
|
param_list.append(f"{column} = %({column})s")
|
188
188
|
params = ' AND '.join(param_list)
|
189
189
|
|
190
|
-
main_dict =
|
190
|
+
main_dict = df.to_dict('records')
|
191
191
|
query = """DELETE FROM {} WHERE {}""".format(outputTableName, params)
|
192
192
|
await self.execute_many(query, main_dict)
|
193
193
|
|
wcp_library/sql/oracle.py
CHANGED
@@ -192,7 +192,7 @@ class OracleConnection(object):
|
|
192
192
|
return rows
|
193
193
|
|
194
194
|
@retry
|
195
|
-
def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName, match_cols: list) -> None:
|
195
|
+
def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName: str, match_cols: list) -> None:
|
196
196
|
"""
|
197
197
|
Remove matching data from the warehouse
|
198
198
|
|
@@ -202,13 +202,13 @@ class OracleConnection(object):
|
|
202
202
|
:return: None
|
203
203
|
"""
|
204
204
|
|
205
|
-
|
205
|
+
df = dfObj[match_cols]
|
206
206
|
param_list = []
|
207
207
|
for column in match_cols:
|
208
208
|
param_list.append(f"{column} = :{column}")
|
209
209
|
params = ' AND '.join(param_list)
|
210
210
|
|
211
|
-
main_dict =
|
211
|
+
main_dict = df.to_dict('records')
|
212
212
|
query = f"""DELETE FROM {outputTableName} WHERE {params}"""
|
213
213
|
self.execute_many(query, main_dict)
|
214
214
|
|
wcp_library/sql/postgres.py
CHANGED
@@ -172,7 +172,7 @@ class PostgresConnection(object):
|
|
172
172
|
return rows
|
173
173
|
|
174
174
|
@retry
|
175
|
-
def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName, match_cols: list) -> None:
|
175
|
+
def remove_matching_data(self, dfObj: pd.DataFrame, outputTableName: str, match_cols: list) -> None:
|
176
176
|
"""
|
177
177
|
Remove matching data from the warehouse
|
178
178
|
|
@@ -182,13 +182,13 @@ class PostgresConnection(object):
|
|
182
182
|
:return: None
|
183
183
|
"""
|
184
184
|
|
185
|
-
|
185
|
+
df = dfObj[match_cols]
|
186
186
|
param_list = []
|
187
187
|
for column in match_cols:
|
188
188
|
param_list.append(f"{column} = %({column})s")
|
189
189
|
params = ' AND '.join(param_list)
|
190
190
|
|
191
|
-
main_dict =
|
191
|
+
main_dict = df.to_dict('records')
|
192
192
|
query = """DELETE FROM {} WHERE {}""".format(outputTableName, params)
|
193
193
|
self.execute_many(query, main_dict)
|
194
194
|
|
@@ -4,8 +4,8 @@ wcp_library/async_credentials/api.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
4
4
|
wcp_library/async_credentials/oracle.py,sha256=MvC7wsHnSyAyPGnRVlH0dvvW2xk5ap_IAByoHX4rUWY,5436
|
5
5
|
wcp_library/async_credentials/postgres.py,sha256=3wjqtLH0Nc-U80iscYnz5DV-9M2X4IjPW51C5MI2_tI,5297
|
6
6
|
wcp_library/async_sql/__init__.py,sha256=m4eWmUGYUEDomhhOp1ScB2uSIXFsNUNO589o5RwWdyM,1035
|
7
|
-
wcp_library/async_sql/oracle.py,sha256=
|
8
|
-
wcp_library/async_sql/postgres.py,sha256=
|
7
|
+
wcp_library/async_sql/oracle.py,sha256=igiBA_Bb3hX4feyRH0AkLbSF1VITPiCAMJM4EGGQYTY,7880
|
8
|
+
wcp_library/async_sql/postgres.py,sha256=fjnYGaIoEAeN8_ClOydBWd36s8NVp_dApCKH-PJyclg,7408
|
9
9
|
wcp_library/credentials/__init__.py,sha256=HRmg7mqcATeclIz3lZQjSR4nmK6aY6MK9-QXEYZoFrw,1857
|
10
10
|
wcp_library/credentials/ftp.py,sha256=FRxKVWifz7olQIrSjDgkTqk7rmc7Zdwmkfq7b62DQY8,4965
|
11
11
|
wcp_library/credentials/oracle.py,sha256=IJVGd10LH5LUNKUSFAbApi0sjR1AbloMJRHTuR9zFrQ,5095
|
@@ -18,8 +18,8 @@ wcp_library/informatica.py,sha256=IXZtk_9X1XLbOEwFrsyOwTgajQKvtXgANBHmuTOP3Kk,40
|
|
18
18
|
wcp_library/logging.py,sha256=e6gG7HFgUrMajUZs4Gs0atFfOJJmdmxN0GerfynNWlY,2061
|
19
19
|
wcp_library/selenium_helper.py,sha256=rlphTXsUgnbaXZknY5nfQqxFhnc7UmrpzhV3hQ-cv7k,2509
|
20
20
|
wcp_library/sql/__init__.py,sha256=CLlBEBrWVAwE79bUxuQiwikSrYH8m9QRYSJ2l0-ofsY,1003
|
21
|
-
wcp_library/sql/oracle.py,sha256=
|
22
|
-
wcp_library/sql/postgres.py,sha256=
|
23
|
-
wcp_library-1.2.
|
24
|
-
wcp_library-1.2.
|
25
|
-
wcp_library-1.2.
|
21
|
+
wcp_library/sql/oracle.py,sha256=vkkI04MtedMoM6qafJsTKV6WFeSGqbpI5qvms_E6wWU,7701
|
22
|
+
wcp_library/sql/postgres.py,sha256=P8eWsXmQSm9tJWYFgYzxfrPuVSFf-Uw8ArHCurEyozg,7005
|
23
|
+
wcp_library-1.2.8.dist-info/METADATA,sha256=tuTS983VfwVeo0BXf4qpRxWqRJ090yN69B8bTKvBYx4,1513
|
24
|
+
wcp_library-1.2.8.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
25
|
+
wcp_library-1.2.8.dist-info/RECORD,,
|
File without changes
|