sws-spark-dissemination-helper 0.0.108__tar.gz → 0.0.109__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.
Files changed (16) hide show
  1. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/PKG-INFO +1 -1
  2. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/pyproject.toml +1 -1
  3. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +8 -4
  4. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/.gitignore +0 -0
  5. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/LICENSE +0 -0
  6. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/README.md +0 -0
  7. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/old_requirements.txt +0 -0
  8. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/requirements.txt +0 -0
  9. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +0 -0
  10. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +0 -0
  11. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +0 -0
  12. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/__init__.py +0 -0
  13. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/constants.py +0 -0
  14. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/src/sws_spark_dissemination_helper/utils.py +0 -0
  15. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/tests/__init__.py +0 -0
  16. {sws_spark_dissemination_helper-0.0.108 → sws_spark_dissemination_helper-0.0.109}/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.108
3
+ Version: 0.0.109
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>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sws-spark-dissemination-helper"
7
- version = "0.0.108"
7
+ version = "0.0.109"
8
8
  dependencies = [
9
9
  "annotated-types==0.7.0",
10
10
  "boto3==1.36.18",
@@ -291,13 +291,17 @@ class SWSPostgresSparkReader:
291
291
  self,
292
292
  domain_code: str,
293
293
  ) -> DataFrame:
294
- return self.read_pg_table_and_check_duplicates_for_domain(
294
+ df = self.read_pg_table(
295
295
  pg_table=DatasetDatatables.MAPPING_CODE_CORRECTION.id,
296
- table_name=DatasetDatatables.MAPPING_CODE_CORRECTION.name,
297
296
  custom_schema=DatasetDatatables.MAPPING_CODE_CORRECTION.schema,
298
- domain_code=domain_code,
299
- unique_columns=["old_code"],
300
297
  )
298
+ df.filter(
299
+ col("mapping_type").isNull() | (col("mapping_type") == lit(""))
300
+ ).transform(
301
+ correct_domain_filter, domain=domain_code, unique_columns=["old_code"]
302
+ )
303
+
304
+ return df
301
305
 
302
306
  def get_domain_code_source_datasets_ids_dest_dataset_id(
303
307
  self, dataset_id: str, domain_code: str = None