sws-spark-dissemination-helper 0.0.119__tar.gz → 0.0.120__tar.gz

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.
Files changed (16) hide show
  1. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/PKG-INFO +1 -1
  2. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/pyproject.toml +1 -1
  3. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/utils.py +20 -0
  4. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/.gitignore +0 -0
  5. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/LICENSE +0 -0
  6. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/README.md +0 -0
  7. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/old_requirements.txt +0 -0
  8. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/requirements.txt +0 -0
  9. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +0 -0
  10. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +0 -0
  11. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +0 -0
  12. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +0 -0
  13. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/__init__.py +0 -0
  14. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/src/sws_spark_dissemination_helper/constants.py +0 -0
  15. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/tests/__init__.py +0 -0
  16. {sws_spark_dissemination_helper-0.0.119 → sws_spark_dissemination_helper-0.0.120}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sws-spark-dissemination-helper
3
- Version: 0.0.119
3
+ Version: 0.0.120
4
4
  Summary: A Python helper package providing streamlined Spark functions for efficient data dissemination processes
5
5
  Project-URL: Repository, https://bitbucket.org/cioapps/sws-it-python-spark-dissemination-helper
6
6
  Author-email: Daniele Mansillo <danielemansillo@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sws-spark-dissemination-helper"
7
- version = "0.0.119"
7
+ version = "0.0.120"
8
8
  dependencies = [
9
9
  "annotated-types==0.7.0",
10
10
  "boto3==1.36.18",
@@ -374,6 +374,26 @@ def map_codes_and_remove_null_duplicates(
374
374
  ),
375
375
  ).otherwise(col("note")),
376
376
  )
377
+ # Add mapping message to notes
378
+ .withColumn(
379
+ "note",
380
+ F.when(
381
+ ~col("is_duplicate")
382
+ & col("new_dim_code").isNotNull()
383
+ & (col("new_dim_code") != lit("")),
384
+ F.array_append(
385
+ col("note"),
386
+ F.concat(
387
+ lit(
388
+ f"Dimension {col_name} code was changed from ",
389
+ col(col_name),
390
+ lit(" to "),
391
+ col("new_dim_code"),
392
+ )
393
+ ),
394
+ ),
395
+ ).otherwise(col("note")),
396
+ )
377
397
  .withColumn(
378
398
  col_name,
379
399
  F.when(