sws-spark-dissemination-helper 0.0.154__tar.gz → 0.0.156__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.
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/PKG-INFO +1 -1
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/pyproject.toml +1 -1
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +12 -4
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/.gitignore +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/LICENSE +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/README.md +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSDatatablesExportHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSEasyIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/constants.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/src/sws_spark_dissemination_helper/utils.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/tests/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/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.
|
|
3
|
+
Version: 0.0.156
|
|
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>
|
|
@@ -347,18 +347,25 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
347
347
|
for dimension_column, df_dimension in zip(
|
|
348
348
|
self.dim_columns_w_time, dfs_dimension_w_validity
|
|
349
349
|
):
|
|
350
|
+
logging.info(f"Joining dimension column: {dimension_column}")
|
|
351
|
+
logging.info(f"df_obs_denorm columns: {df_obs_denorm.columns}")
|
|
352
|
+
logging.info(
|
|
353
|
+
f"Is dimension {dimension_column} in the dataframe? {dimension_column in df_obs_denorm.columns}"
|
|
354
|
+
)
|
|
355
|
+
df_dimension.show(5)
|
|
350
356
|
df_obs_denorm = (
|
|
351
357
|
df_obs_denorm.alias("o")
|
|
352
358
|
.join(
|
|
353
359
|
F.broadcast(df_dimension.withColumnRenamed("id", "join_id")).alias(
|
|
354
360
|
"d"
|
|
355
361
|
),
|
|
356
|
-
col(f"{dimension_column}") == col("d.
|
|
362
|
+
col(f"{dimension_column}") == col("d.code"),
|
|
357
363
|
)
|
|
358
|
-
.drop(
|
|
359
|
-
.withColumnRenamed("code", dimension_column)
|
|
364
|
+
.drop("code", "join_id")
|
|
360
365
|
)
|
|
361
|
-
|
|
366
|
+
logging.info(f"After join count: {df_obs_denorm.count()}")
|
|
367
|
+
|
|
368
|
+
df_element_uom.show(5)
|
|
362
369
|
df_obs_denorm = (
|
|
363
370
|
df_obs_denorm.alias("d")
|
|
364
371
|
.join(
|
|
@@ -368,6 +375,7 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
368
375
|
)
|
|
369
376
|
.drop("element_code")
|
|
370
377
|
)
|
|
378
|
+
logging.info(f"After uom count: {df_obs_denorm.count()}")
|
|
371
379
|
|
|
372
380
|
return df_obs_denorm
|
|
373
381
|
|
{sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/tests/__init__.py
RENAMED
|
File without changes
|
{sws_spark_dissemination_helper-0.0.154 → sws_spark_dissemination_helper-0.0.156}/tests/test.py
RENAMED
|
File without changes
|