sws-spark-dissemination-helper 0.0.113__tar.gz → 0.0.115__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.113 → sws_spark_dissemination_helper-0.0.115}/PKG-INFO +2 -2
  2. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/pyproject.toml +2 -2
  3. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/requirements.txt +1 -1
  4. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/SWSBronzeIcebergSparkHelper.py +4 -0
  5. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/SWSGoldIcebergSparkHelper.py +4 -6
  6. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/SWSSilverIcebergSparkHelper.py +7 -0
  7. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/.gitignore +0 -0
  8. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/LICENSE +0 -0
  9. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/README.md +0 -0
  10. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/old_requirements.txt +0 -0
  11. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/SWSPostgresSparkReader.py +0 -0
  12. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/__init__.py +0 -0
  13. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/constants.py +0 -0
  14. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/src/sws_spark_dissemination_helper/utils.py +0 -0
  15. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/tests/__init__.py +0 -0
  16. {sws_spark_dissemination_helper-0.0.113 → sws_spark_dissemination_helper-0.0.115}/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.113
3
+ Version: 0.0.115
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>
@@ -49,7 +49,7 @@ Requires-Dist: pytz==2025.1
49
49
  Requires-Dist: requests==2.32.3
50
50
  Requires-Dist: s3transfer==0.11.2
51
51
  Requires-Dist: six==1.17.0
52
- Requires-Dist: sws-api-client==1.4.5
52
+ Requires-Dist: sws-api-client>=1.5.0
53
53
  Requires-Dist: typing-extensions==4.12.2
54
54
  Requires-Dist: tzdata==2025.1
55
55
  Requires-Dist: urllib3==1.26.20
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sws-spark-dissemination-helper"
7
- version = "0.0.113"
7
+ version = "0.0.115"
8
8
  dependencies = [
9
9
  "annotated-types==0.7.0",
10
10
  "boto3==1.36.18",
@@ -25,7 +25,7 @@ dependencies = [
25
25
  "requests==2.32.3",
26
26
  "s3transfer==0.11.2",
27
27
  "six==1.17.0",
28
- "sws_api_client==1.4.5",
28
+ "sws_api_client>=1.5.0",
29
29
  "typing_extensions==4.12.2",
30
30
  "tzdata==2025.1",
31
31
  "urllib3==1.26.20"
@@ -17,7 +17,7 @@ pytz==2025.1
17
17
  requests==2.32.3
18
18
  s3transfer==0.11.2
19
19
  six==1.17.0
20
- sws_api_client==1.4.5
20
+ sws_api_client==1.5.0
21
21
  typing_extensions==4.12.2
22
22
  tzdata==2025.1
23
23
  urllib3==1.26.20
@@ -417,11 +417,13 @@ class SWSBronzeIcebergSparkHelper:
417
417
  description="Bronze table containing all the raw data imported from the SWS and denormalized",
418
418
  layer=TableLayer.BRONZE,
419
419
  private=True,
420
+ debug=True,
420
421
  type=TableType.ICEBERG,
421
422
  database=IcebergDatabases.BRONZE_DATABASE,
422
423
  table=self.iceberg_tables.BRONZE.table,
423
424
  path=self.iceberg_tables.BRONZE.path,
424
425
  structure={"columns": self.df_bronze.schema.jsonValue()["fields"]},
426
+ pinned_columns=[*self.dim_columns_w_time, "value", *self.flag_columns],
425
427
  )
426
428
  tag = tags.add_dissemination_table(
427
429
  self.dataset_id, self.tag_name, new_iceberg_table
@@ -434,6 +436,7 @@ class SWSBronzeIcebergSparkHelper:
434
436
  description="Bronze table containing all the raw data imported from the SWS and denormalized cached in csv",
435
437
  layer=TableLayer.BRONZE,
436
438
  private=True,
439
+ debug=True,
437
440
  type=TableType.CSV,
438
441
  path=self.iceberg_tables.BRONZE.csv_path,
439
442
  structure={"columns": self.df_bronze.schema.jsonValue()["fields"]},
@@ -502,6 +505,7 @@ class SWSBronzeIcebergSparkHelper:
502
505
  structure={
503
506
  "columns": self.disseminated_tag_df.schema.jsonValue()["fields"]
504
507
  },
508
+ pinned_columns=[*self.dim_columns_w_time, "value", *self.flag_columns],
505
509
  )
506
510
  tag = tags.add_dissemination_table(
507
511
  self.dataset_id, self.tag_name, new_iceberg_table
@@ -138,9 +138,7 @@ class SWSGoldIcebergSparkHelper:
138
138
 
139
139
  return df
140
140
 
141
- def write_gold_sws_data_to_iceberg_and_csv(
142
- self, df: DataFrame
143
- ) -> DataFrame:
141
+ def write_gold_sws_data_to_iceberg_and_csv(self, df: DataFrame) -> DataFrame:
144
142
  df.writeTo(self.iceberg_tables.GOLD_SWS.iceberg_id).createOrReplace()
145
143
 
146
144
  logging.info(
@@ -433,6 +431,7 @@ class SWSGoldIcebergSparkHelper:
433
431
  description="Gold table containing all the cleaned data in SDMX compatible format, ready to be mapped using FMR",
434
432
  layer=TableLayer.GOLD,
435
433
  private=True,
434
+ debug=True,
436
435
  type=TableType.ICEBERG,
437
436
  database=IcebergDatabases.GOLD_DATABASE,
438
437
  table=self.iceberg_tables.GOLD_PRE_SDMX.table,
@@ -454,6 +453,7 @@ class SWSGoldIcebergSparkHelper:
454
453
  description="Gold table containing all the cleaned data in SDMX compatible format, ready to be mapped using FMR and cached in csv",
455
454
  layer=TableLayer.GOLD,
456
455
  private=True,
456
+ debug=True,
457
457
  type=TableType.CSV,
458
458
  path=self.iceberg_tables.GOLD_PRE_SDMX.csv_path,
459
459
  structure={"columns": df.schema.jsonValue()["fields"]},
@@ -469,9 +469,7 @@ class SWSGoldIcebergSparkHelper:
469
469
 
470
470
  return df
471
471
 
472
- def write_gold_sws_dissemination_tag(
473
- self, df: DataFrame, tags: Tags
474
- ) -> DataFrame:
472
+ def write_gold_sws_dissemination_tag(self, df: DataFrame, tags: Tags) -> DataFrame:
475
473
  # Get or create a new tag
476
474
  tag = get_or_create_tag(tags, self.dataset_id, self.tag_name, self.tag_name)
477
475
  logging.debug(f"Tag: {tag}")
@@ -656,6 +656,13 @@ class SWSSilverIcebergSparkHelper:
656
656
  type=TableType.CSV,
657
657
  path=self.iceberg_tables.SILVER.csv_path,
658
658
  structure={"columns": df.schema.jsonValue()["fields"]},
659
+ pinned_columns=[
660
+ *self.dim_columns_w_time,
661
+ "value",
662
+ *self.flag_columns,
663
+ "diss_flag",
664
+ "note",
665
+ ],
659
666
  )
660
667
  tag = upsert_disseminated_table(
661
668
  sws_tags=tags,