sws-spark-dissemination-helper 0.0.99__tar.gz → 0.0.100__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.99 → sws_spark_dissemination_helper-0.0.100}/PKG-INFO +1 -1
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/pyproject.toml +1 -1
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +18 -18
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/.gitignore +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/LICENSE +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/README.md +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/old_requirements.txt +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/requirements.txt +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/constants.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/src/sws_spark_dissemination_helper/utils.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/tests/__init__.py +0 -0
- {sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/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.100
|
|
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>
|
|
@@ -494,27 +494,27 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
494
494
|
logging.info(f"dimension_name: {dimension_name}")
|
|
495
495
|
logging.info(f"codes: {codes}")
|
|
496
496
|
if len(codes) != 0:
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
# )
|
|
507
|
-
self.disseminated_tag_df = self.disseminated_tag_df.filter(
|
|
508
|
-
col(dimension_name).isin(codes)
|
|
497
|
+
not_in_codes = ",".join([f"'{code}'" for code in codes])
|
|
498
|
+
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})"
|
|
499
|
+
logging.info(f"delete_from_branch_query: {delete_from_branch_query}")
|
|
500
|
+
delete_from_branch_query_result = self.spark.sql(
|
|
501
|
+
delete_from_branch_query
|
|
502
|
+
).collect()
|
|
503
|
+
|
|
504
|
+
logging.info(
|
|
505
|
+
f"result of delete_from_branch_query: {delete_from_branch_query_result}"
|
|
509
506
|
)
|
|
507
|
+
# self.disseminated_tag_df = self.disseminated_tag_df.filter(
|
|
508
|
+
# col(dimension_name).isin(codes)
|
|
509
|
+
# )
|
|
510
510
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
self.disseminated_tag_df = self.spark.read.option(
|
|
512
|
+
"branch", f"`diss_tag_{self.tag_name}`"
|
|
513
|
+
).table(self.iceberg_tables.BRONZE.iceberg_id)
|
|
514
514
|
|
|
515
|
-
self.disseminated_tag_df.writeTo(
|
|
516
|
-
|
|
517
|
-
).overwritePartitions()
|
|
515
|
+
# self.disseminated_tag_df.writeTo(
|
|
516
|
+
# f"{self.iceberg_tables.BRONZE.iceberg_id}.`branch_diss_tag_{self.tag_name}`"
|
|
517
|
+
# ).overwritePartitions()
|
|
518
518
|
|
|
519
519
|
disseminated_tag_df = self.disseminated_tag_df.withColumn(
|
|
520
520
|
"metadata", F.to_json(col("metadata"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/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.99 → sws_spark_dissemination_helper-0.0.100}/tests/__init__.py
RENAMED
|
File without changes
|
{sws_spark_dissemination_helper-0.0.99 → sws_spark_dissemination_helper-0.0.100}/tests/test.py
RENAMED
|
File without changes
|