sws-spark-dissemination-helper 0.0.91__tar.gz → 0.0.93__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.91 → sws_spark_dissemination_helper-0.0.93}/PKG-INFO +1 -1
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/pyproject.toml +1 -1
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +13 -4
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/.gitignore +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/LICENSE +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/README.md +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/old_requirements.txt +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/requirements.txt +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/constants.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/src/sws_spark_dissemination_helper/utils.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/tests/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/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.93
|
|
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>
|
|
@@ -450,9 +450,11 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
450
450
|
|
|
451
451
|
create_branch_query = f"ALTER TABLE {self.iceberg_tables.BRONZE.iceberg_id}.`tag_{self.tag_name}` CREATE OR REPLACE BRANCH `diss_tag_{self.tag_name}`" # AS OF VERSION `{tag_name}`
|
|
452
452
|
logging.info(f"create_branch_query: {create_branch_query}")
|
|
453
|
-
self.spark.sql(create_branch_query)
|
|
454
|
-
|
|
453
|
+
create_branch_query_result = self.spark.sql(create_branch_query).collect()
|
|
454
|
+
|
|
455
|
+
logging.info(f"result of create_branch_query: {create_branch_query_result}")
|
|
455
456
|
|
|
457
|
+
logging.info(f"dimensions: {dimensions}")
|
|
456
458
|
for dimension_name, codes in dimensions.items():
|
|
457
459
|
logging.info(f"dimension_name: {dimension_name}")
|
|
458
460
|
logging.info(f"codes: {codes}")
|
|
@@ -460,9 +462,16 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
460
462
|
not_in_codes = ",".join([f"'{code}'" for code in codes])
|
|
461
463
|
delete_from_branch_query = f"DELETE FROM {self.iceberg_tables.BRONZE.iceberg_id}.`branch_diss_tag_{self.tag_name}` WHERE {dimension_name} NOT IN ({not_in_codes})"
|
|
462
464
|
logging.info(f"delete_from_branch_query: {delete_from_branch_query}")
|
|
463
|
-
self.spark.sql(
|
|
465
|
+
delete_from_branch_query_result = self.spark.sql(
|
|
466
|
+
delete_from_branch_query
|
|
467
|
+
).collect()
|
|
468
|
+
|
|
469
|
+
logging.info(
|
|
470
|
+
f"result of delete_from_branch_query: {delete_from_branch_query_result}"
|
|
471
|
+
)
|
|
472
|
+
|
|
464
473
|
self.disseminated_tag_df = self.spark.read.option(
|
|
465
|
-
"branch", self.tag_name
|
|
474
|
+
"branch", f"`diss_tag_{self.tag_name}`"
|
|
466
475
|
).table(self.iceberg_tables.BRONZE.iceberg_id)
|
|
467
476
|
|
|
468
477
|
disseminated_tag_df = self.disseminated_tag_df.withColumn(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/old_requirements.txt
RENAMED
|
File without changes
|
{sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/requirements.txt
RENAMED
|
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.91 → sws_spark_dissemination_helper-0.0.93}/tests/__init__.py
RENAMED
|
File without changes
|
{sws_spark_dissemination_helper-0.0.91 → sws_spark_dissemination_helper-0.0.93}/tests/test.py
RENAMED
|
File without changes
|