berryworld 1.0.0.195810__py3-none-any.whl → 1.0.0.196257__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.
- berryworld/handy_mix.py +2 -1
- berryworld/snowflake_conn.py +1 -1
- berryworld/sql_conn.py +4 -4
- berryworld/sql_connenction.py +8 -8
- {berryworld-1.0.0.195810.dist-info → berryworld-1.0.0.196257.dist-info}/METADATA +1 -1
- {berryworld-1.0.0.195810.dist-info → berryworld-1.0.0.196257.dist-info}/RECORD +9 -9
- {berryworld-1.0.0.195810.dist-info → berryworld-1.0.0.196257.dist-info}/WHEEL +0 -0
- {berryworld-1.0.0.195810.dist-info → berryworld-1.0.0.196257.dist-info}/licenses/LICENSE +0 -0
- {berryworld-1.0.0.195810.dist-info → berryworld-1.0.0.196257.dist-info}/top_level.txt +0 -0
berryworld/handy_mix.py
CHANGED
|
@@ -231,7 +231,8 @@ class HandyMix:
|
|
|
231
231
|
if data[float_col].dtype == float:
|
|
232
232
|
if all(['.0' in val for val in data[float_col].loc[~data[float_col].isnull()].astype(str).values]):
|
|
233
233
|
data.loc[~data[float_col].isnull(), float_col] = data.loc[
|
|
234
|
-
~data[float_col].isnull(), float_col].astype(str).str.replace(
|
|
234
|
+
~data[float_col].isnull(), float_col].astype(str).str.replace(
|
|
235
|
+
'.0', '', regex=True).infer_objects(copy=False)
|
|
235
236
|
|
|
236
237
|
return data
|
|
237
238
|
|
berryworld/snowflake_conn.py
CHANGED
|
@@ -17,7 +17,7 @@ class SnowflakeConn:
|
|
|
17
17
|
self.server = server
|
|
18
18
|
|
|
19
19
|
try:
|
|
20
|
-
server_creds = os.environ.get(f"
|
|
20
|
+
server_creds = os.environ.get(f"SNOWFLAKE-{self.db_reference.upper()}")
|
|
21
21
|
server_creds = ast.literal_eval(server_creds)
|
|
22
22
|
except Exception as e:
|
|
23
23
|
raise ValueError(f'Snowflake DB reference: {self.db_reference} not found. ERROR: {e}')
|
berryworld/sql_conn.py
CHANGED
|
@@ -311,7 +311,7 @@ class SQLConn:
|
|
|
311
311
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
312
312
|
# Deal with bull values and apostrophes (')
|
|
313
313
|
data = data.replace("'NULL'", "NULL")
|
|
314
|
-
data = data.replace("'", "~~", regex=True)
|
|
314
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
315
315
|
data = data.fillna("null")
|
|
316
316
|
# Insert data into the table destination
|
|
317
317
|
records = [tuple(x) for x in data.values]
|
|
@@ -406,7 +406,7 @@ class SQLConn:
|
|
|
406
406
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
407
407
|
# Deal with bull values and apostrophes (')
|
|
408
408
|
data = data.replace("'NULL'", "NULL")
|
|
409
|
-
data = data.replace("'", "~~", regex=True)
|
|
409
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
410
410
|
data = data.fillna("null")
|
|
411
411
|
# Insert data into the table destination
|
|
412
412
|
records = [tuple(x) for x in data.values]
|
|
@@ -648,7 +648,7 @@ class SQLConn:
|
|
|
648
648
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
649
649
|
# Deal with bull values and apostrophes (')
|
|
650
650
|
data = data.replace("'NULL'", "NULL")
|
|
651
|
-
data = data.replace("'", "~~", regex=True)
|
|
651
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
652
652
|
data = data.fillna("null")
|
|
653
653
|
|
|
654
654
|
records = [tuple(x) for x in data.values]
|
|
@@ -758,7 +758,7 @@ class SQLConn:
|
|
|
758
758
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
759
759
|
# Deal with null values and apostrophes (')
|
|
760
760
|
data = data.replace("'NULL'", "NULL")
|
|
761
|
-
data = data.replace("'", "~~", regex=True)
|
|
761
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
762
762
|
data = data.fillna("null")
|
|
763
763
|
# Insert in Staging Table
|
|
764
764
|
records = [tuple(x) for x in data.values]
|
berryworld/sql_connenction.py
CHANGED
|
@@ -338,13 +338,13 @@ class SQLConnection:
|
|
|
338
338
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
339
339
|
# Deal with bull values and apostrophes (')
|
|
340
340
|
data = data.replace("'NULL'", "NULL")
|
|
341
|
-
data = data.replace("'", "~~", regex=True)
|
|
341
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
342
342
|
data = data.fillna("null")
|
|
343
343
|
# Insert data into the table destination
|
|
344
344
|
records = [tuple(x) for x in data.values]
|
|
345
345
|
insert_ = """INSERT INTO [%s].[%s] """ % (schema, table)
|
|
346
|
-
insert_ += str(tuple(data.columns.values)).replace(
|
|
347
|
-
|
|
346
|
+
insert_ += str(tuple(data.columns.values)).replace(
|
|
347
|
+
"(\'", "([").replace('\', \'', '], [').replace('\')', '])')
|
|
348
348
|
if len(output) > 0:
|
|
349
349
|
insert_ += " OUTPUT Inserted.[" + "], Inserted.[".join(output) + "] "
|
|
350
350
|
insert_ += """ VALUES """
|
|
@@ -433,13 +433,13 @@ class SQLConnection:
|
|
|
433
433
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
434
434
|
# Deal with bull values and apostrophes (')
|
|
435
435
|
data = data.replace("'NULL'", "NULL")
|
|
436
|
-
data = data.replace("'", "~~", regex=True)
|
|
436
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
437
437
|
data = data.fillna("null")
|
|
438
438
|
# Insert data into the table destination
|
|
439
439
|
records = [tuple(x) for x in data.values]
|
|
440
440
|
insert_ = """INSERT INTO [%s].[%s] """ % (schema, table)
|
|
441
|
-
insert_ += str(tuple(data.columns.values)).replace(
|
|
442
|
-
|
|
441
|
+
insert_ += str(tuple(data.columns.values)).replace(
|
|
442
|
+
"(\'", "([").replace('\', \'', '], [').replace('\')', '])')
|
|
443
443
|
if len(output) > 0:
|
|
444
444
|
insert_ += " OUTPUT Inserted.[" + "], Inserted.[".join(output) + "] "
|
|
445
445
|
insert_ += """ VALUES """
|
|
@@ -675,7 +675,7 @@ class SQLConnection:
|
|
|
675
675
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
676
676
|
# Deal with bull values and apostrophes (')
|
|
677
677
|
data = data.replace("'NULL'", "NULL")
|
|
678
|
-
data = data.replace("'", "~~", regex=True)
|
|
678
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
679
679
|
data = data.fillna("null")
|
|
680
680
|
|
|
681
681
|
records = [tuple(x) for x in data.values]
|
|
@@ -785,7 +785,7 @@ class SQLConnection:
|
|
|
785
785
|
data[cat_cols] = data[cat_cols].astype(str)
|
|
786
786
|
# Deal with null values and apostrophes (')
|
|
787
787
|
data = data.replace("'NULL'", "NULL")
|
|
788
|
-
data = data.replace("'", "~~", regex=True)
|
|
788
|
+
data = data.replace("'", "~~", regex=True).infer_objects(copy=False)
|
|
789
789
|
data = data.fillna("null")
|
|
790
790
|
# Insert in Staging Table
|
|
791
791
|
records = [tuple(x) for x in data.values]
|
|
@@ -9,7 +9,7 @@ berryworld/devops.py,sha256=7mRbyZPGzk5ox-6J2etv3NxCcfP4cprG0_Xelh7prn8,9776
|
|
|
9
9
|
berryworld/email_con.py,sha256=CVyEDVnc_iVeRTwJgIU31ToFgyix7L2yn4Ih9Wu7I5s,15806
|
|
10
10
|
berryworld/email_logging.py,sha256=LeSrTExhQhar49gJR2wGC1dS0lqsNpFl9pS3eYWqnuo,4936
|
|
11
11
|
berryworld/generate_env.py,sha256=kJuBb0OOYjoa2gyAnZHgn3gpoEZ8rPbMhnKcTYfENUk,11875
|
|
12
|
-
berryworld/handy_mix.py,sha256=
|
|
12
|
+
berryworld/handy_mix.py,sha256=dN33Pya8fh5YBR6jSDsxbAle8rKpPYebMbasf6kcaZ4,10734
|
|
13
13
|
berryworld/logging.py,sha256=tOxzaFALQm3aVVEc3I7t8MU6PwgUI9VSnzNCH9yRryo,1013
|
|
14
14
|
berryworld/logic_apps.py,sha256=a0uU4tNO3v2w7grdBv-OOx4hUf7VBIerJpwZ9U-29dQ,14591
|
|
15
15
|
berryworld/microsoft_teams.py,sha256=8uPo0yku-euBj2VdzBoZCeX3IcsCCOqISLqaVZUVxfA,16030
|
|
@@ -17,21 +17,21 @@ berryworld/persistent_storage.py,sha256=L15kLyzN42T6UB1WAg8rFXJq3Mdb1M8Sw4P5YQaU
|
|
|
17
17
|
berryworld/pickle_management.py,sha256=5o6UuXBpTj23Jgpz6sj9V-vdcdWBK1xMEckWxT-Whj4,2436
|
|
18
18
|
berryworld/power_automate.py,sha256=V86QEGG9H36DrDvod9Q6yp8OUu307hfYcXJhw06pYrA,27912
|
|
19
19
|
berryworld/sharepoint_con.py,sha256=nmyZJIcaAKJ6Y-ti4gQbvzA_rRbrMGIxTDXe4eP-tiI,44950
|
|
20
|
-
berryworld/snowflake_conn.py,sha256=
|
|
21
|
-
berryworld/sql_conn.py,sha256=
|
|
22
|
-
berryworld/sql_connenction.py,sha256=
|
|
20
|
+
berryworld/snowflake_conn.py,sha256=L0ePgTKa3tvaxj88BZmsjS6cFp3ZU3rytw7S2jkuA-U,3161
|
|
21
|
+
berryworld/sql_conn.py,sha256=6kUR3oLXweakz2IBc4zI1ZMqRoN8K6nbQneHhenM-7I,47668
|
|
22
|
+
berryworld/sql_connenction.py,sha256=BKHb2AVl59yxQwAXbK8pt0GFSGOPccBbUA9yop4K2R4,48780
|
|
23
23
|
berryworld/teams_logging.py,sha256=8NwXyWr4fLj7W6GzAm2nRQCGFDxibQpAHDHHD24FrP8,6997
|
|
24
24
|
berryworld/transportation_solver.py,sha256=tNc1JJk71azIBccdWVHbqcvXWhalOdKffv6HmBD6tG0,5014
|
|
25
25
|
berryworld/verify_keys.py,sha256=X7VUHqYDklWPDO0bGVHIOXeLq5Qi4fZRZbHYw5x7UnA,4356
|
|
26
26
|
berryworld/vivantio.py,sha256=QfZo0UKqkzVRg_LyiwivNd3aEup4TH57x4KxLZkCJwc,10627
|
|
27
27
|
berryworld/vivantio_logging.py,sha256=ciy7gA4u3FrgUIpEBnMgocbNPp6jcu9TPoy-kLcrTZU,5736
|
|
28
28
|
berryworld/xml_parser.py,sha256=HWD71NaTN3DaIOGT6Wzxs4CEsroFhGQwe9iPLIL80Co,957
|
|
29
|
-
berryworld-1.0.0.
|
|
29
|
+
berryworld-1.0.0.196257.dist-info/licenses/LICENSE,sha256=vtkVCJM6E2af2gnsi2XxKPr4WY-uIbvzVLXieFND0UU,1074
|
|
30
30
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
31
|
tests/test_allocation_config.py,sha256=e12l6fE9U57eSPS35g6ekJ_hol7-RHg89JV60_m1BlE,4633
|
|
32
32
|
tests/test_handy_mix_config.py,sha256=Un56mz9KJmdn4K4OwzHAHLSRzDU1Xv2nFrONNuzOG04,2594
|
|
33
33
|
tests/test_xml_parser.py,sha256=3QTlhFEd6KbK6nRFKZnc35tad6wqukTbe4QrFi8mr_8,859
|
|
34
|
-
berryworld-1.0.0.
|
|
35
|
-
berryworld-1.0.0.
|
|
36
|
-
berryworld-1.0.0.
|
|
37
|
-
berryworld-1.0.0.
|
|
34
|
+
berryworld-1.0.0.196257.dist-info/METADATA,sha256=ZXmujcDreqDhz8QvyNP0MwAcrl_0I6vWhATexM5_eJg,1445
|
|
35
|
+
berryworld-1.0.0.196257.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
berryworld-1.0.0.196257.dist-info/top_level.txt,sha256=GIZ5qy-P5oxfEH755vA1IMFeTVdX3-40JxMe6nOe5I8,17
|
|
37
|
+
berryworld-1.0.0.196257.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|