informatica-python 1.8.0__tar.gz → 1.8.1__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 (30) hide show
  1. {informatica_python-1.8.0 → informatica_python-1.8.1}/PKG-INFO +1 -1
  2. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/__init__.py +1 -1
  3. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/mapping_gen.py +16 -4
  4. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/PKG-INFO +1 -1
  5. {informatica_python-1.8.0 → informatica_python-1.8.1}/pyproject.toml +1 -1
  6. {informatica_python-1.8.0 → informatica_python-1.8.1}/tests/test_integration.py +1 -1
  7. {informatica_python-1.8.0 → informatica_python-1.8.1}/LICENSE +0 -0
  8. {informatica_python-1.8.0 → informatica_python-1.8.1}/README.md +0 -0
  9. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/cli.py +0 -0
  10. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/converter.py +0 -0
  11. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/__init__.py +0 -0
  12. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/config_gen.py +0 -0
  13. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/error_log_gen.py +0 -0
  14. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/helper_gen.py +0 -0
  15. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/sql_gen.py +0 -0
  16. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/generators/workflow_gen.py +0 -0
  17. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/models.py +0 -0
  18. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/parser.py +0 -0
  19. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/utils/__init__.py +0 -0
  20. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/utils/datatype_map.py +0 -0
  21. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/utils/expression_converter.py +0 -0
  22. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/utils/lib_adapters.py +0 -0
  23. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python/utils/sql_dialect.py +0 -0
  24. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/SOURCES.txt +0 -0
  25. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/dependency_links.txt +0 -0
  26. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/entry_points.txt +0 -0
  27. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/requires.txt +0 -0
  28. {informatica_python-1.8.0 → informatica_python-1.8.1}/informatica_python.egg-info/top_level.txt +0 -0
  29. {informatica_python-1.8.0 → informatica_python-1.8.1}/setup.cfg +0 -0
  30. {informatica_python-1.8.0 → informatica_python-1.8.1}/tests/test_converter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: informatica-python
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: Convert Informatica PowerCenter workflow XML to Python/PySpark code
5
5
  Author: Nick
6
6
  License: MIT
@@ -7,7 +7,7 @@ Licensed under the MIT License.
7
7
 
8
8
  from informatica_python.converter import InformaticaConverter
9
9
 
10
- __version__ = "1.8.0"
10
+ __version__ = "1.8.1"
11
11
  __author__ = "Nick"
12
12
  __license__ = "MIT"
13
13
  __all__ = ["InformaticaConverter"]
@@ -644,7 +644,10 @@ def _generate_source_qualifier(lines, sq, source_map, source_dfs, connector_grap
644
644
  lines.append(f" df_{sq_safe} = df_{_safe_name(next(iter(connected_sources)))}")
645
645
 
646
646
  source_dfs[sq.name] = f"df_{sq_safe}"
647
- lines.append(f" logger.info(f'Source {sq.name}: {{len(df_{sq_safe})}} rows read')")
647
+ lines.append(f" try:")
648
+ lines.append(f" logger.info(f'Source {sq.name}: {{len(df_{sq_safe})}} rows read')")
649
+ lines.append(f" except Exception:")
650
+ lines.append(f" logger.info('Source {sq.name}: rows read (count unavailable)')")
648
651
 
649
652
  if post_sql:
650
653
  lines.append(f" # Post-SQL")
@@ -684,7 +687,10 @@ def _generate_transformation(lines, tx, connector_graph, source_dfs, transform_m
684
687
  lines.append(f" # Input fields: {', '.join(in_fields[:10])}{' ...' if len(in_fields) > 10 else ''}")
685
688
  lines.append(f" # Output fields: {', '.join(out_fields[:10])}{' ...' if len(out_fields) > 10 else ''}")
686
689
  lines.append(f" # -------------------------------------------------------------------")
687
- lines.append(f" _input_rows_{tx_safe} = len({input_df}) if hasattr({input_df}, '__len__') else 0")
690
+ lines.append(f" try:")
691
+ lines.append(f" _input_rows_{tx_safe} = len({input_df})")
692
+ lines.append(f" except Exception:")
693
+ lines.append(f" _input_rows_{tx_safe} = -1")
688
694
 
689
695
  if tx_type == "expression":
690
696
  _gen_expression_transform(lines, tx, tx_safe, input_df, source_dfs, data_lib)
@@ -724,7 +730,10 @@ def _generate_transformation(lines, tx, connector_graph, source_dfs, transform_m
724
730
  lines.append(f" df_{tx_safe} = {copy_expr}")
725
731
  source_dfs[tx.name] = f"df_{tx_safe}"
726
732
 
727
- lines.append(f" _output_rows_{tx_safe} = len(df_{tx_safe}) if hasattr(df_{tx_safe}, '__len__') else 0")
733
+ lines.append(f" try:")
734
+ lines.append(f" _output_rows_{tx_safe} = len(df_{tx_safe})")
735
+ lines.append(f" except Exception:")
736
+ lines.append(f" _output_rows_{tx_safe} = -1")
728
737
  lines.append(f" logger.info(f'{tx.name} ({tx.type}): {{_input_rows_{tx_safe}}} input rows -> {{_output_rows_{tx_safe}}} output rows')")
729
738
  lines.append("")
730
739
 
@@ -1392,7 +1401,10 @@ def _generate_target_write(lines, tgt_name, tgt_def, connector_graph, source_dfs
1392
1401
  else:
1393
1402
  lines.append(f" write_file(df_target_{tgt_safe}, config.get('targets', {{}}).get('{tgt_def.name}', {{}}).get('file_path', '{tgt_def.name}'),")
1394
1403
  lines.append(f" config.get('targets', {{}}).get('{tgt_def.name}', {{}}))")
1395
- lines.append(f" logger.info(f'Target {tgt_def.name}: {{len(df_target_{tgt_safe})}} rows written')")
1404
+ lines.append(f" try:")
1405
+ lines.append(f" logger.info(f'Target {tgt_def.name}: {{len(df_target_{tgt_safe})}} rows written')")
1406
+ lines.append(f" except Exception:")
1407
+ lines.append(f" logger.info('Target {tgt_def.name}: rows written (count unavailable)')")
1396
1408
 
1397
1409
 
1398
1410
  CAST_MAP = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: informatica-python
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: Convert Informatica PowerCenter workflow XML to Python/PySpark code
5
5
  Author: Nick
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "informatica-python"
7
- version = "1.8.0"
7
+ version = "1.8.1"
8
8
  description = "Convert Informatica PowerCenter workflow XML to Python/PySpark code"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -1236,7 +1236,7 @@ class TestLoggingEnrichment:
1236
1236
  folder = FolderDef(name="TestFolder", mappings=[mapping])
1237
1237
  code = generate_mapping_code(mapping, folder, "pandas", 1)
1238
1238
  assert "_input_rows_fil_active = len(" in code
1239
- assert "_output_rows_fil_active = len(df_fil_active)" in code
1239
+ assert "_output_rows_fil_active = len(df_fil_active" in code
1240
1240
  assert "FIL_ACTIVE (Filter):" in code
1241
1241
  assert "input rows ->" in code
1242
1242
  assert "output rows" in code