dcs-sdk 1.7.3__py3-none-any.whl → 1.7.4__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.
dcs_sdk/__version__.py CHANGED
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "1.7.3"
15
+ __version__ = "1.7.4"
@@ -439,27 +439,39 @@ def apply_custom_masking(
439
439
 
440
440
  # common masking columns
441
441
  for col in common_masking_cols:
442
- src_val = str(source.get(col, ""))
443
- tgt_val = str(target.get(col, ""))
442
+ src_val = source.get(col)
443
+ tgt_val = target.get(col)
444
444
 
445
- src_len, tgt_len = len(src_val), len(tgt_val)
446
- if src_len == tgt_len and src_val != tgt_val:
447
- masked_source[col] = mask_char * (src_len + 1)
448
- masked_target[col] = mask_char * tgt_len
445
+ if src_val is None and tgt_val is None:
446
+ continue
447
+
448
+ src_str = str(src_val) if src_val is not None else ""
449
+ tgt_str = str(tgt_val) if tgt_val is not None else ""
450
+
451
+ src_len, tgt_len = len(src_str), len(tgt_str)
452
+ if src_len == tgt_len and src_str != tgt_str:
453
+ if src_val is not None:
454
+ masked_source[col] = mask_char * (src_len + 1)
455
+ if tgt_val is not None:
456
+ masked_target[col] = mask_char * tgt_len
449
457
  else:
450
- masked_source[col] = mask_char * src_len
451
- masked_target[col] = mask_char * tgt_len
458
+ if src_val is not None:
459
+ masked_source[col] = mask_char * src_len
460
+ if tgt_val is not None:
461
+ masked_target[col] = mask_char * tgt_len
452
462
 
453
463
  # Non-common columns
454
464
  for col in source_masking_cols:
455
465
  if col not in common_masking_cols:
456
- val = source.get(col, "")
457
- masked_source[col] = mask_char * len(val)
466
+ val = source.get(col)
467
+ if val is not None:
468
+ masked_source[col] = mask_char * len(str(val))
458
469
 
459
470
  for col in target_masking_cols:
460
471
  if col not in common_masking_cols:
461
- val = target.get(col, "")
462
- masked_target[col] = mask_char * len(val)
472
+ val = target.get(col)
473
+ if val is not None:
474
+ masked_target[col] = mask_char * len(str(val))
463
475
 
464
476
  return masked_source, masked_target
465
477
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcs-sdk
3
- Version: 1.7.3
3
+ Version: 1.7.4
4
4
  Summary: SDK for DataChecks
5
5
  Author: Waterdip Labs
6
6
  Author-email: hello@waterdip.ai
@@ -86,7 +86,7 @@ Requires-Dist: vertica-python (>=1.4.0) ; extra == "vertica" or extra == "all-db
86
86
  Description-Content-Type: text/markdown
87
87
 
88
88
  <h1 align="center">
89
- DCS SDK v1.7.3
89
+ DCS SDK v1.7.4
90
90
  </h1>
91
91
 
92
92
  > SDK for DataChecks
@@ -134,7 +134,7 @@ dcs_core/report/static/index.js,sha256=p4wvku-zlXi0y4gWeSzV1amY0s4mjtUq2QsezARLV
134
134
  dcs_core/report/static/index.js.LICENSE.txt,sha256=bBDZBJVEDrqjCi7sfoF8CchjFn3hdcbNkP7ub7kbcXQ,201041
135
135
  dcs_sdk/__init__.py,sha256=RkfhRKLXEForLCs4rZkTf0qc_b0TokSggSAcKI4yfZg,610
136
136
  dcs_sdk/__main__.py,sha256=Qn8stIaQGrdLjHQ-H7xO0T-brtq5RWZoWU9QvqoarV8,683
137
- dcs_sdk/__version__.py,sha256=VAxrIaAjQhQeJyLv4wVUT4hDFjRY-sd4tCEabyJZf3c,633
137
+ dcs_sdk/__version__.py,sha256=ZRK4QBUilILjo7h5_d7FuTLhbBM4aJj6kS5UDIrdZH4,633
138
138
  dcs_sdk/cli/__init__.py,sha256=RkfhRKLXEForLCs4rZkTf0qc_b0TokSggSAcKI4yfZg,610
139
139
  dcs_sdk/cli/cli.py,sha256=jaO52UrMWLafcF_yhqllPkmYSTuO2sksFi30fYFdAB4,4406
140
140
  dcs_sdk/sdk/__init__.py,sha256=skrZcgWWJBL6NXTUERywJ3qRJRemgpDXyW7lPg1FJk8,2107
@@ -155,8 +155,8 @@ dcs_sdk/sdk/utils/similarity_score/jaccard_provider.py,sha256=Jd0TvIGOULNTsiCL_F
155
155
  dcs_sdk/sdk/utils/similarity_score/levenshtein_distance_provider.py,sha256=puAWPnoWfNo4BN4-kXIUHrtrt5jLv3Vkw_NfHvjYrn4,1185
156
156
  dcs_sdk/sdk/utils/table.py,sha256=X8HxdYTWyx_oVrBWPsXlmA-xJKXXDBW9RrhlWNqA1As,18224
157
157
  dcs_sdk/sdk/utils/themes.py,sha256=Meo2Yldv4uyPpEqI7qdA28Aa6sxtwUU1dLKKm4QavjM,1403
158
- dcs_sdk/sdk/utils/utils.py,sha256=a9QGEVL8L7asbJm_VBwgKvJQknsvuqWS0uTUaHsDPiY,16463
159
- dcs_sdk-1.7.3.dist-info/METADATA,sha256=QGS-xCUD-U_OekE9djc6t7sAtNkoOo5KzJKkWP6Jqz8,7652
160
- dcs_sdk-1.7.3.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
161
- dcs_sdk-1.7.3.dist-info/entry_points.txt,sha256=XhODNz7UccgPOyklXgp7pIfTTXArd6-V0mImjhnhwto,80
162
- dcs_sdk-1.7.3.dist-info/RECORD,,
158
+ dcs_sdk/sdk/utils/utils.py,sha256=F7BUnLgJFyb7mc_9cw1hyk4lutsg6ctJuBQRrfyBv0g,16874
159
+ dcs_sdk-1.7.4.dist-info/METADATA,sha256=qVNFesr-vlH-JvTyy9haJemG2TK-lQURlJiNtX1q2Ls,7652
160
+ dcs_sdk-1.7.4.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
161
+ dcs_sdk-1.7.4.dist-info/entry_points.txt,sha256=XhODNz7UccgPOyklXgp7pIfTTXArd6-V0mImjhnhwto,80
162
+ dcs_sdk-1.7.4.dist-info/RECORD,,