sws-spark-dissemination-helper 0.0.171__py3-none-any.whl → 0.0.173__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.
- sws_spark_dissemination_helper/utils.py +9 -9
- {sws_spark_dissemination_helper-0.0.171.dist-info → sws_spark_dissemination_helper-0.0.173.dist-info}/METADATA +3 -3
- {sws_spark_dissemination_helper-0.0.171.dist-info → sws_spark_dissemination_helper-0.0.173.dist-info}/RECORD +5 -5
- {sws_spark_dissemination_helper-0.0.171.dist-info → sws_spark_dissemination_helper-0.0.173.dist-info}/WHEEL +0 -0
- {sws_spark_dissemination_helper-0.0.171.dist-info → sws_spark_dissemination_helper-0.0.173.dist-info}/licenses/LICENSE +0 -0
|
@@ -363,26 +363,26 @@ def map_codes_and_remove_null_duplicates(
|
|
|
363
363
|
"diss_flag", F.when(col("delete"), lit(False)).otherwise(col("diss_flag"))
|
|
364
364
|
)
|
|
365
365
|
.withColumn(
|
|
366
|
-
"
|
|
366
|
+
"diss_note",
|
|
367
367
|
F.when(
|
|
368
368
|
col("delete"),
|
|
369
369
|
F.array_append(
|
|
370
|
-
col("
|
|
370
|
+
col("diss_note"),
|
|
371
371
|
lit(
|
|
372
372
|
f"The observation is not disseminated according to the Mapping - Code correction table"
|
|
373
373
|
),
|
|
374
374
|
),
|
|
375
|
-
).otherwise(col("
|
|
375
|
+
).otherwise(col("diss_note")),
|
|
376
376
|
)
|
|
377
377
|
# Add mapping message to notes
|
|
378
378
|
.withColumn(
|
|
379
|
-
"
|
|
379
|
+
"diss_note",
|
|
380
380
|
F.when(
|
|
381
381
|
~col("is_duplicate")
|
|
382
382
|
& col("new_dim_code").isNotNull()
|
|
383
383
|
& (col("new_dim_code") != lit("")),
|
|
384
384
|
F.array_append(
|
|
385
|
-
col("
|
|
385
|
+
col("diss_note"),
|
|
386
386
|
F.concat(
|
|
387
387
|
lit(f"Dimension {col_name} code was changed from "),
|
|
388
388
|
col(col_name),
|
|
@@ -390,7 +390,7 @@ def map_codes_and_remove_null_duplicates(
|
|
|
390
390
|
col("new_dim_code"),
|
|
391
391
|
),
|
|
392
392
|
),
|
|
393
|
-
).otherwise(col("
|
|
393
|
+
).otherwise(col("diss_note")),
|
|
394
394
|
)
|
|
395
395
|
.withColumn(
|
|
396
396
|
col_name,
|
|
@@ -409,18 +409,18 @@ def map_codes_and_remove_null_duplicates(
|
|
|
409
409
|
).otherwise(col("diss_flag")),
|
|
410
410
|
)
|
|
411
411
|
.withColumn(
|
|
412
|
-
"
|
|
412
|
+
"diss_note",
|
|
413
413
|
F.when(
|
|
414
414
|
col("is_duplicate")
|
|
415
415
|
& col("new_dim_code").isNotNull()
|
|
416
416
|
& (col("new_dim_code") != lit("")),
|
|
417
417
|
F.array_append(
|
|
418
|
-
col("
|
|
418
|
+
col("diss_note"),
|
|
419
419
|
lit(
|
|
420
420
|
f"The code correction was not applied to avoid observation duplications"
|
|
421
421
|
),
|
|
422
422
|
),
|
|
423
|
-
).otherwise(col("
|
|
423
|
+
).otherwise(col("diss_note")),
|
|
424
424
|
)
|
|
425
425
|
# Check the domain specific multiplier first and then the standard multiplier
|
|
426
426
|
.withColumn("value", col("value") * F.coalesce(col("multiplier"), lit(1)))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sws-spark-dissemination-helper
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.173
|
|
4
4
|
Summary: A Python helper package providing streamlined Spark functions for efficient data dissemination processes
|
|
5
5
|
Project-URL: Repository, https://github.com/un-fao/fao-sws-it-python-spark-dissemination-helper
|
|
6
6
|
Author-email: Daniele Mansillo <danielemansillo@gmail.com>
|
|
@@ -31,8 +31,8 @@ Classifier: Operating System :: OS Independent
|
|
|
31
31
|
Classifier: Programming Language :: Python :: 3
|
|
32
32
|
Requires-Python: >=3.9
|
|
33
33
|
Requires-Dist: annotated-types==0.7.0
|
|
34
|
-
Requires-Dist: boto3>=1.40.
|
|
35
|
-
Requires-Dist: botocore>=1.40.
|
|
34
|
+
Requires-Dist: boto3>=1.40.0
|
|
35
|
+
Requires-Dist: botocore>=1.40.0
|
|
36
36
|
Requires-Dist: certifi==2025.1.31
|
|
37
37
|
Requires-Dist: charset-normalizer==3.4.1
|
|
38
38
|
Requires-Dist: idna>=3.10
|
|
@@ -6,8 +6,8 @@ sws_spark_dissemination_helper/SWSPostgresSparkReader.py,sha256=KpG8gp8Ai9pHDiKh
|
|
|
6
6
|
sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py,sha256=qioLv3SlJEfk0LzTiwfXRtZXVImPOJUeh9k1XwHC-pA,26225
|
|
7
7
|
sws_spark_dissemination_helper/__init__.py,sha256=42TPbk7KxAud_qY3Sr_F4F7VjyofUlxEJkUXAFQsjRo,327
|
|
8
8
|
sws_spark_dissemination_helper/constants.py,sha256=vQmalAqInwPAybgJOfYx99jn47KsKp8jeD8eqmjw-Rs,13471
|
|
9
|
-
sws_spark_dissemination_helper/utils.py,sha256=
|
|
10
|
-
sws_spark_dissemination_helper-0.0.
|
|
11
|
-
sws_spark_dissemination_helper-0.0.
|
|
12
|
-
sws_spark_dissemination_helper-0.0.
|
|
13
|
-
sws_spark_dissemination_helper-0.0.
|
|
9
|
+
sws_spark_dissemination_helper/utils.py,sha256=Ge8zXsUIcvFihALDNLF5kCu_tAdRQUE04xE6Yn9xQF4,22008
|
|
10
|
+
sws_spark_dissemination_helper-0.0.173.dist-info/METADATA,sha256=G6ANeATMnjFSNjCLaUxOXGqZaH88M7dhqt-Lz7U3uoA,2822
|
|
11
|
+
sws_spark_dissemination_helper-0.0.173.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
12
|
+
sws_spark_dissemination_helper-0.0.173.dist-info/licenses/LICENSE,sha256=zFzeb_j_6pXEHwH8Z0OpIkKFJk7vmhZjdem-K0d4zU4,1073
|
|
13
|
+
sws_spark_dissemination_helper-0.0.173.dist-info/RECORD,,
|
|
File without changes
|