informatica-python 1.8.2__tar.gz → 1.9.0__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.
- {informatica_python-1.8.2 → informatica_python-1.9.0}/PKG-INFO +6 -2
- {informatica_python-1.8.2 → informatica_python-1.9.0}/README.md +5 -1
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/__init__.py +1 -1
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/converter.py +10 -1
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/workflow_gen.py +2 -2
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/PKG-INFO +6 -2
- {informatica_python-1.8.2 → informatica_python-1.9.0}/pyproject.toml +1 -1
- {informatica_python-1.8.2 → informatica_python-1.9.0}/tests/test_converter.py +6 -1
- {informatica_python-1.8.2 → informatica_python-1.9.0}/tests/test_integration.py +4 -4
- {informatica_python-1.8.2 → informatica_python-1.9.0}/LICENSE +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/cli.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/__init__.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/config_gen.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/error_log_gen.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/helper_gen.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/mapping_gen.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/sql_gen.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/models.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/parser.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/__init__.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/datatype_map.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/expression_converter.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/lib_adapters.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/sql_dialect.py +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/SOURCES.txt +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/dependency_links.txt +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/entry_points.txt +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/requires.txt +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/top_level.txt +0 -0
- {informatica_python-1.8.2 → informatica_python-1.9.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: informatica-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Convert Informatica PowerCenter workflow XML to Python/PySpark code
|
|
5
5
|
Author: Nick
|
|
6
6
|
License: MIT
|
|
@@ -97,7 +97,7 @@ converter.convert_to_files("workflow_export.xml", "output_dir", data_lib="polars
|
|
|
97
97
|
| File | Description |
|
|
98
98
|
|------|-------------|
|
|
99
99
|
| `helper_functions.py` | Database/file I/O helpers, Informatica expression equivalents (80+ functions), window/analytic functions, stored procedure execution, state persistence |
|
|
100
|
-
| `
|
|
100
|
+
| `mapping_{name}.py` | One per mapping, named after the real Informatica mapping name — transformation logic with row-count logging, source reads, target writes, inline documentation |
|
|
101
101
|
| `workflow.py` | Task orchestration with topological ordering, decision branching, worklet calls, and error handling |
|
|
102
102
|
| `config.yml` | Connection configs, source/target metadata, runtime parameters |
|
|
103
103
|
| `all_sql_queries.sql` | All SQL extracted from Source Qualifiers, Lookups, SQL transforms (with ANSI-translated variants) |
|
|
@@ -304,6 +304,10 @@ Converts Informatica expressions to Python equivalents:
|
|
|
304
304
|
|
|
305
305
|
## Changelog
|
|
306
306
|
|
|
307
|
+
### v1.9.x (Phase 8)
|
|
308
|
+
- Mapping output files now use real mapping names (e.g., `mapping_m_customer_load.py`) instead of generic numeric indices (`mapping_1.py`)
|
|
309
|
+
- Workflow imports automatically match the named mapping files
|
|
310
|
+
|
|
307
311
|
### v1.8.x (Phase 7)
|
|
308
312
|
- Row-count logging at every pipeline step (source reads, transforms, target writes)
|
|
309
313
|
- Backend-safe logging (try/except wrapped for Dask/lazy backends)
|
|
@@ -70,7 +70,7 @@ converter.convert_to_files("workflow_export.xml", "output_dir", data_lib="polars
|
|
|
70
70
|
| File | Description |
|
|
71
71
|
|------|-------------|
|
|
72
72
|
| `helper_functions.py` | Database/file I/O helpers, Informatica expression equivalents (80+ functions), window/analytic functions, stored procedure execution, state persistence |
|
|
73
|
-
| `
|
|
73
|
+
| `mapping_{name}.py` | One per mapping, named after the real Informatica mapping name — transformation logic with row-count logging, source reads, target writes, inline documentation |
|
|
74
74
|
| `workflow.py` | Task orchestration with topological ordering, decision branching, worklet calls, and error handling |
|
|
75
75
|
| `config.yml` | Connection configs, source/target metadata, runtime parameters |
|
|
76
76
|
| `all_sql_queries.sql` | All SQL extracted from Source Qualifiers, Lookups, SQL transforms (with ANSI-translated variants) |
|
|
@@ -277,6 +277,10 @@ Converts Informatica expressions to Python equivalents:
|
|
|
277
277
|
|
|
278
278
|
## Changelog
|
|
279
279
|
|
|
280
|
+
### v1.9.x (Phase 8)
|
|
281
|
+
- Mapping output files now use real mapping names (e.g., `mapping_m_customer_load.py`) instead of generic numeric indices (`mapping_1.py`)
|
|
282
|
+
- Workflow imports automatically match the named mapping files
|
|
283
|
+
|
|
280
284
|
### v1.8.x (Phase 7)
|
|
281
285
|
- Row-count logging at every pipeline step (source reads, transforms, target writes)
|
|
282
286
|
- Backend-safe logging (try/except wrapped for Dask/lazy backends)
|
|
@@ -19,6 +19,14 @@ class InformaticaConverter:
|
|
|
19
19
|
self.parser = InformaticaParser()
|
|
20
20
|
self.powermart = None
|
|
21
21
|
|
|
22
|
+
@staticmethod
|
|
23
|
+
def _safe_name(name):
|
|
24
|
+
import re
|
|
25
|
+
safe = re.sub(r'[^a-zA-Z0-9_]', '_', name)
|
|
26
|
+
if safe and safe[0].isdigit():
|
|
27
|
+
safe = '_' + safe
|
|
28
|
+
return safe.lower()
|
|
29
|
+
|
|
22
30
|
def parse_file(self, file_path: str) -> dict:
|
|
23
31
|
self.powermart = self.parser.parse_file(file_path)
|
|
24
32
|
return self.to_json()
|
|
@@ -102,7 +110,8 @@ class InformaticaConverter:
|
|
|
102
110
|
|
|
103
111
|
for i, mapping in enumerate(folder.mappings, 1):
|
|
104
112
|
code = generate_mapping_code(mapping, folder, self.data_lib, i, validate_casts=validate_casts)
|
|
105
|
-
|
|
113
|
+
safe_name = self._safe_name(mapping.name)
|
|
114
|
+
files[f"mapping_{safe_name}.py"] = code
|
|
106
115
|
|
|
107
116
|
files["workflow.py"] = generate_workflow_code(folder)
|
|
108
117
|
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/workflow_gen.py
RENAMED
|
@@ -25,9 +25,9 @@ def generate_workflow_code(folder: FolderDef) -> str:
|
|
|
25
25
|
lines.append("from helper_functions import load_config, logger, load_persistent_state, save_persistent_state, get_persistent_variable, set_persistent_variable")
|
|
26
26
|
lines.append("")
|
|
27
27
|
|
|
28
|
-
for
|
|
28
|
+
for mapping in folder.mappings:
|
|
29
29
|
safe_name = _safe_name(mapping.name)
|
|
30
|
-
lines.append(f"from mapping_{
|
|
30
|
+
lines.append(f"from mapping_{safe_name} import run_{safe_name}")
|
|
31
31
|
lines.append("")
|
|
32
32
|
lines.append("")
|
|
33
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: informatica-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Convert Informatica PowerCenter workflow XML to Python/PySpark code
|
|
5
5
|
Author: Nick
|
|
6
6
|
License: MIT
|
|
@@ -97,7 +97,7 @@ converter.convert_to_files("workflow_export.xml", "output_dir", data_lib="polars
|
|
|
97
97
|
| File | Description |
|
|
98
98
|
|------|-------------|
|
|
99
99
|
| `helper_functions.py` | Database/file I/O helpers, Informatica expression equivalents (80+ functions), window/analytic functions, stored procedure execution, state persistence |
|
|
100
|
-
| `
|
|
100
|
+
| `mapping_{name}.py` | One per mapping, named after the real Informatica mapping name — transformation logic with row-count logging, source reads, target writes, inline documentation |
|
|
101
101
|
| `workflow.py` | Task orchestration with topological ordering, decision branching, worklet calls, and error handling |
|
|
102
102
|
| `config.yml` | Connection configs, source/target metadata, runtime parameters |
|
|
103
103
|
| `all_sql_queries.sql` | All SQL extracted from Source Qualifiers, Lookups, SQL transforms (with ANSI-translated variants) |
|
|
@@ -304,6 +304,10 @@ Converts Informatica expressions to Python equivalents:
|
|
|
304
304
|
|
|
305
305
|
## Changelog
|
|
306
306
|
|
|
307
|
+
### v1.9.x (Phase 8)
|
|
308
|
+
- Mapping output files now use real mapping names (e.g., `mapping_m_customer_load.py`) instead of generic numeric indices (`mapping_1.py`)
|
|
309
|
+
- Workflow imports automatically match the named mapping files
|
|
310
|
+
|
|
307
311
|
### v1.8.x (Phase 7)
|
|
308
312
|
- Row-count logging at every pipeline step (source reads, transforms, target writes)
|
|
309
313
|
- Backend-safe logging (try/except wrapped for Dask/lazy backends)
|
|
@@ -104,7 +104,6 @@ def test_convert_to_files():
|
|
|
104
104
|
|
|
105
105
|
expected_files = [
|
|
106
106
|
"helper_functions.py",
|
|
107
|
-
"mapping_1.py",
|
|
108
107
|
"workflow.py",
|
|
109
108
|
"config.yml",
|
|
110
109
|
"all_sql_queries.sql",
|
|
@@ -118,6 +117,12 @@ def test_convert_to_files():
|
|
|
118
117
|
assert size > 0, f"{f} should not be empty"
|
|
119
118
|
print(f" {f}: {size} bytes")
|
|
120
119
|
|
|
120
|
+
mapping_files = [f for f in os.listdir(output_dir) if f.startswith("mapping_") and f.endswith(".py")]
|
|
121
|
+
assert len(mapping_files) > 0, "At least one mapping file should exist"
|
|
122
|
+
for mf in mapping_files:
|
|
123
|
+
assert mf != "mapping_1.py", "Mapping files should use real mapping names, not numeric indices"
|
|
124
|
+
print(f" {mf}: {os.path.getsize(os.path.join(output_dir, mf))} bytes")
|
|
125
|
+
|
|
121
126
|
print(f"PASS: test_convert_to_files")
|
|
122
127
|
|
|
123
128
|
|
|
@@ -337,7 +337,7 @@ class TestCodeGeneration:
|
|
|
337
337
|
converter = InformaticaConverter(data_lib="pandas")
|
|
338
338
|
output = converter.convert_string(MINIMAL_XML, output_dir=self.tmpdir)
|
|
339
339
|
|
|
340
|
-
mapping_path = os.path.join(output, "
|
|
340
|
+
mapping_path = os.path.join(output, "mapping_m_test_expr.py")
|
|
341
341
|
assert os.path.exists(mapping_path)
|
|
342
342
|
|
|
343
343
|
with open(mapping_path) as f:
|
|
@@ -350,7 +350,7 @@ class TestCodeGeneration:
|
|
|
350
350
|
converter = InformaticaConverter(data_lib="pandas")
|
|
351
351
|
output = converter.convert_string(FILTER_XML, output_dir=self.tmpdir)
|
|
352
352
|
|
|
353
|
-
mapping_path = os.path.join(output, "
|
|
353
|
+
mapping_path = os.path.join(output, "mapping_m_test_filter.py")
|
|
354
354
|
with open(mapping_path) as f:
|
|
355
355
|
code = f.read()
|
|
356
356
|
assert 'Filter' in code
|
|
@@ -378,7 +378,7 @@ class TestCodeGeneration:
|
|
|
378
378
|
output = converter.convert_string(MINIMAL_XML, output_dir=self.tmpdir)
|
|
379
379
|
|
|
380
380
|
expected_files = [
|
|
381
|
-
"helper_functions.py", "
|
|
381
|
+
"helper_functions.py", "mapping_m_test_expr.py", "workflow.py",
|
|
382
382
|
"config.yml", "all_sql_queries.sql", "error_log.txt",
|
|
383
383
|
]
|
|
384
384
|
for fname in expected_files:
|
|
@@ -398,7 +398,7 @@ class TestCodeGeneration:
|
|
|
398
398
|
converter = InformaticaConverter(data_lib="pandas")
|
|
399
399
|
output = converter.convert_string(MINIMAL_XML, output_dir=self.tmpdir)
|
|
400
400
|
|
|
401
|
-
mapping_path = os.path.join(output, "
|
|
401
|
+
mapping_path = os.path.join(output, "mapping_m_test_expr.py")
|
|
402
402
|
with open(mapping_path) as f:
|
|
403
403
|
code = f.read()
|
|
404
404
|
compile(code, mapping_path, "exec")
|
|
File without changes
|
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/__init__.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/config_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/error_log_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/helper_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/mapping_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/generators/sql_gen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/datatype_map.py
RENAMED
|
File without changes
|
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/lib_adapters.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python/utils/sql_dialect.py
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{informatica_python-1.8.2 → informatica_python-1.9.0}/informatica_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|