sws-spark-dissemination-helper 0.0.101__py3-none-any.whl → 0.0.103__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/SWSBronzeIcebergSparkHelper.py +6 -9
- sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +3 -2
- {sws_spark_dissemination_helper-0.0.101.dist-info → sws_spark_dissemination_helper-0.0.103.dist-info}/METADATA +1 -1
- {sws_spark_dissemination_helper-0.0.101.dist-info → sws_spark_dissemination_helper-0.0.103.dist-info}/RECORD +6 -6
- {sws_spark_dissemination_helper-0.0.101.dist-info → sws_spark_dissemination_helper-0.0.103.dist-info}/WHEEL +0 -0
- {sws_spark_dissemination_helper-0.0.101.dist-info → sws_spark_dissemination_helper-0.0.103.dist-info}/licenses/LICENSE +0 -0
|
@@ -387,18 +387,12 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
387
387
|
|
|
388
388
|
logging.info(f"Bronze table written to {self.iceberg_tables.BRONZE.iceberg_id}")
|
|
389
389
|
|
|
390
|
+
self.spark.sql(
|
|
391
|
+
f"ALTER ICEBERG TABLE {self.iceberg_tables.BRONZE.iceberg_id} REFRESH;"
|
|
392
|
+
)
|
|
390
393
|
self.spark.sql(
|
|
391
394
|
f"ALTER TABLE {self.iceberg_tables.BRONZE.iceberg_id} CREATE TAG `{self.tag_name}`"
|
|
392
395
|
)
|
|
393
|
-
while (
|
|
394
|
-
self.spark.sql(
|
|
395
|
-
f"SELECT * FROM {self.iceberg_tables.BRONZE.iceberg_id}.refs"
|
|
396
|
-
)
|
|
397
|
-
.filter((col("type") == lit("TAG")) & (col("name") == lit(self.tag_name)))
|
|
398
|
-
.count()
|
|
399
|
-
) == 0:
|
|
400
|
-
logging.info(f"Waiting for the tag {self.tag_name} to be created")
|
|
401
|
-
time.sleep(2)
|
|
402
396
|
|
|
403
397
|
logging.info(f"bronze tag '{self.tag_name}' created")
|
|
404
398
|
|
|
@@ -476,6 +470,9 @@ class SWSBronzeIcebergSparkHelper:
|
|
|
476
470
|
f"Bronze disseminated tag table written to {self.iceberg_tables.BRONZE_DISS_TAG.iceberg_id}"
|
|
477
471
|
)
|
|
478
472
|
|
|
473
|
+
self.spark.sql(
|
|
474
|
+
f"ALTER ICEBERG TABLE {self.iceberg_tables.BRONZE_DISS_TAG.iceberg_id} REFRESH;"
|
|
475
|
+
)
|
|
479
476
|
self.spark.sql(
|
|
480
477
|
f"ALTER TABLE {self.iceberg_tables.BRONZE_DISS_TAG.iceberg_id} CREATE TAG `{self.tag_name}`"
|
|
481
478
|
)
|
|
@@ -110,9 +110,10 @@ class SWSSilverIcebergSparkHelper:
|
|
|
110
110
|
return self.spark.read.option("tag", self.tag_name).table(
|
|
111
111
|
self.iceberg_tables.BRONZE.iceberg_id
|
|
112
112
|
)
|
|
113
|
+
|
|
113
114
|
def read_bronze_diss_tag_data(self) -> DataFrame:
|
|
114
|
-
return self.spark.read.option("
|
|
115
|
-
self.iceberg_tables.
|
|
115
|
+
return self.spark.read.option("tag", self.tag_name).table(
|
|
116
|
+
self.iceberg_tables.BRONZE_DISS_TAG.iceberg_id
|
|
116
117
|
)
|
|
117
118
|
|
|
118
119
|
def _get_dim_time_flag_columns(self) -> Tuple[List[str], List[str], str, List[str]]:
|
|
@@ -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.103
|
|
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>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py,sha256=
|
|
1
|
+
sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py,sha256=KqRX5yl3rk7qntuxtPSdKoPFwSbzeyp3HjHRB3JUaaE,20026
|
|
2
2
|
sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py,sha256=ZC7hxkppo6qmfCc2z5vm2Y2iH1901F-rx9Er9cxuzP4,16037
|
|
3
3
|
sws_spark_dissemination_helper/SWSPostgresSparkReader.py,sha256=ja7AbOfbmC_EXHCJk7UMDzzbA-LRxzPkaaUmuvcihJ8,17449
|
|
4
|
-
sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py,sha256=
|
|
4
|
+
sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py,sha256=08xA7h4oVicKOnjEoMrLXpuk9mZ2GTiTPx3C7rCI7pg,22224
|
|
5
5
|
sws_spark_dissemination_helper/__init__.py,sha256=Efjoe9V4vGXWVp-DY5P6NbRwIUr_zkZJkDmMi-lf5Bc,262
|
|
6
6
|
sws_spark_dissemination_helper/constants.py,sha256=yG_pUi2PVeFKz6pogAU2AGQ-wV4FHWRHOW77wE_XGL0,11436
|
|
7
7
|
sws_spark_dissemination_helper/utils.py,sha256=6SzrXX0xhvynRyv-vRFDbc6V4UNe_RzKKETZAtefnhg,21341
|
|
8
|
-
sws_spark_dissemination_helper-0.0.
|
|
9
|
-
sws_spark_dissemination_helper-0.0.
|
|
10
|
-
sws_spark_dissemination_helper-0.0.
|
|
11
|
-
sws_spark_dissemination_helper-0.0.
|
|
8
|
+
sws_spark_dissemination_helper-0.0.103.dist-info/METADATA,sha256=Bfx-ejCQkuh116Ip3YMIuBnhG3B1bJp7JWyOhIi2mLA,2824
|
|
9
|
+
sws_spark_dissemination_helper-0.0.103.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
sws_spark_dissemination_helper-0.0.103.dist-info/licenses/LICENSE,sha256=zFzeb_j_6pXEHwH8Z0OpIkKFJk7vmhZjdem-K0d4zU4,1073
|
|
11
|
+
sws_spark_dissemination_helper-0.0.103.dist-info/RECORD,,
|
|
File without changes
|