informatica-python 1.9.8__py3-none-any.whl → 1.9.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: informatica-python
3
- Version: 1.9.8
3
+ Version: 1.9.9
4
4
  Summary: Convert Informatica PowerCenter workflow XML to Python/PySpark code
5
5
  Author: Nick
6
6
  License: MIT
@@ -124,7 +124,7 @@ The code generator produces real, runnable Python for these transformation types
124
124
  - **Expression** — Field-level expressions converted to vectorized pandas operations (`df["COL"]` style) with 40+ vectorized function handlers
125
125
  - **Filter** — Row filtering with vectorized converted conditions
126
126
  - **Joiner** — `pd.merge()` with join type and condition parsing (inner/left/right/outer)
127
- - **Lookup** — `pd.merge()` lookups with connection-aware DB reads, multiple match policies, default values, `$$PARAM` substitution
127
+ - **Lookup** — `pd.merge()` lookups with connection-aware DB reads, multiple match policies, default values, `$$PARAM` substitution, SQL override support, table caching via `lookup_func()`
128
128
  - **Aggregator** — `groupby().agg()` with SUM/COUNT/AVG/MIN/MAX/FIRST/LAST, computed aggregates
129
129
  - **Sorter** — `sort_values()` with multi-key ascending/descending per-field direction from SORTDIRECTION attribute
130
130
  - **Router** — Multi-group conditional routing with named groups
@@ -196,7 +196,7 @@ Column-level pandas operations instead of row-level iteration. The expression co
196
196
  - `REPLACECHR/REPLACESTR` → `.str.replace()`
197
197
  - `REG_EXTRACT/REG_REPLACE` → `.str.extract()/.str.replace(regex=True)`
198
198
  - `CHR(code)` → `chr(int(code))`
199
- - `||` concatenation → `+` with `.astype(str)` on non-literals
199
+ - `||` concatenation → `+` with smart coercion: `.fillna('').astype(str)` for Series, `str()` for scalars
200
200
 
201
201
  **Date/Time:**
202
202
  - `TO_DATE(val, fmt)` → `pd.to_datetime()` with Informatica→Python format conversion
@@ -343,10 +343,12 @@ Target field datatypes are mapped to pandas types and generate proper casting co
343
343
  - Decimals/Floats: `pd.to_numeric(errors='coerce')`
344
344
  - Booleans: `.astype('boolean')`
345
345
 
346
- ### Flat File Handling (v1.3+)
346
+ ### Flat File Handling (v1.3+, enhanced v1.9.8)
347
347
 
348
348
  Parses FLATFILE metadata for delimiter, fixed-width, header lines, skip rows, quote/escape chars. Generates `pd.read_fwf()` for fixed-width or enriched `read_file()` for delimited.
349
349
 
350
+ **Fixed-width enhancements (v1.9.8):** `OFFSET`, `PHYSICALLENGTH`, and `PHYSICALOFFSET` are parsed from `SOURCEFIELD` attributes. `physical_length` is preferred over `precision` for accurate column width calculations in `pd.read_fwf()`.
351
+
350
352
  ### Mapplet Inlining (v1.3+)
351
353
 
352
354
  Expands Mapplet instances into prefixed transforms, rewires connectors, and eliminates duplication.
@@ -371,12 +373,17 @@ The generated `helper_functions.py` provides a complete runtime library:
371
373
  ### Database Operations
372
374
  | Function | Description |
373
375
  |----------|-------------|
374
- | `get_db_connection(config, conn_name)` | Create DB connection (pyodbc/pymssql/sqlalchemy fallback for MSSQL) |
376
+ | `get_db_connection(config, conn_name)` | SQLAlchemy-first DB connection with engine caching and connection pooling; DBAPI fallback for pyodbc/pymssql |
375
377
  | `read_from_db(config, query, conn_name)` | Execute SQL query and return DataFrame |
376
378
  | `write_to_db(config, df, table, conn_name)` | Write DataFrame to database table via `.to_sql()` |
377
- | `execute_sql(config, sql, conn_name)` | Execute DDL/DML statement (INSERT, UPDATE, DELETE) |
379
+ | `execute_sql(config, sql, conn_name)` | Execute DDL/DML statement; auto-detects SQLAlchemy vs DBAPI via `dialect` attribute |
378
380
  | `write_with_update_strategy(config, df, table, ...)` | Split rows by `_update_strategy` column into INSERT/UPDATE/DELETE/REJECT operations |
379
381
  | `call_stored_procedure(config, proc, params, ...)` | Execute stored procedure with input/output parameter mapping (Oracle/MSSQL/generic) |
382
+ | `lookup_func(table, *args)` | Full lookup implementation with table caching, condition parsing, and default value support |
383
+ | `resolve_env(value)` | Resolve `${VAR}` placeholders from environment variables with config fallback |
384
+ | `resolve_builtin_variable(var_name, ...)` | Resolve `$PMMappingName`, `$PMSessionName`, `$PMFolderName`, etc. |
385
+ | `rename_with_duplicates(df, col_map)` | Safe column rename supporting one-source-to-many-target mapping |
386
+ | `_safe_close(conn)` | Safe connection cleanup handling both SQLAlchemy and raw DBAPI connections |
380
387
 
381
388
  ### File Operations
382
389
  | Function | Description |
@@ -407,7 +414,34 @@ The generated `helper_functions.py` provides a complete runtime library:
407
414
 
408
415
  ## Changelog
409
416
 
410
- ### v1.9.3 (Current)
417
+ ### v1.9.8 (Current)
418
+ - **NOT(expr) function-call form**: `NOT(ISNULL(x))` now correctly converts to `~(df["x"].isna())` — handles both `NOT ` (with space) and `NOT(` (without space) forms
419
+ - **AND/OR/NOT as field names fix**: Logical operators no longer mangled into `df["AND"]` / `df["OR"]` — conversion moved before field substitution in both `_vec_recursive` fallback and `_vectorize_simple`
420
+ - **Condition tokenizer word-boundary fix**: `_split_condition_tokens` no longer splits on `OR` inside field names like `DeletedIndicator` — verifies preceding character is a real word boundary
421
+ - **`$PMMappingName` in expressions**: `$PM*` built-in variables in expression context properly convert to `resolve_builtin_variable("PMMappingName")` instead of being mangled to `$df["PMMappingName"]`
422
+ - **TO_CHAR arithmetic parenthesization**: `TO_CHAR(TO_INTEGER(x) - 1)` now produces `(pd.to_numeric(...) - 1).astype(str)` instead of incorrect `- 1.astype(str)` binding
423
+ - **String literal early-return fix**: Expressions like `'PER_' || X || '_suffix'` no longer short-circuit as a single string literal
424
+ - **Fixed-width file enhancements**: `OFFSET`, `PHYSICALLENGTH`, `PHYSICALOFFSET` parsed from SOURCEFIELD XML; `physical_length` preferred over `precision` for `read_fwf` column widths
425
+ - **Smart concat coercion**: Scalar returns (e.g. `resolve_builtin_variable()`, `get_variable()`) use `str()` wrapping; Series use `.fillna('').astype(str)`
426
+ - **700 tests** passing
427
+
428
+ ### v1.9.5 / v1.9.6
429
+ - **`rename_with_duplicates`** helper for one-source-to-many-target column mapping
430
+ - **`resolve_env()`** for `${VAR}` placeholder resolution (env → config fallback)
431
+ - **`resolve_builtin_variable()`** for `$PMMappingName`, `$PMSessionName`, `$PMFolderName`, etc.
432
+ - **SQLAlchemy-first `get_db_connection`**: Engine caching and connection pooling; DBAPI fallback for pyodbc/pymssql
433
+ - **`_safe_close()`**: Safe connection cleanup handling both SQLAlchemy and raw DBAPI connections
434
+ - **Full `lookup_func()` implementation**: Table caching, condition parsing, default value support
435
+ - **Null-safe `||` concatenation**: `.fillna('').astype(str)` prevents "nan" strings in concatenation
436
+ - **`$PM*` variable substitution in SQL Override queries**
437
+ - **`execute_sql` dialect detection**: Uses `dialect` attribute to choose SQLAlchemy `text()` vs DBAPI `cursor.execute()`
438
+ - **678 tests** passing
439
+
440
+ ### v1.9.4
441
+ - Extended expression function coverage and edge-case fixes
442
+ - Improved mapplet and connector handling
443
+
444
+ ### v1.9.3
411
445
  - **Smart target write detection**: Bare targets default to `write_to_db()` instead of `write_file()`; file extension allowlist (`.csv`, `.dat`, `.txt`, `.xml`, `.json`, `.parquet`, `.xlsx`, `.xls`, `.tsv`, `.avro`) for file targets; schema-qualified names (`dbo.TABLE`) correctly route to database
412
446
  - **DECODE vectorization**: `DECODE(TRUE, cond1, val1, ..., default)` → nested `np.where()` chains; value-matching DECODE; handles IN() conditions and complex boolean nesting
413
447
  - **IS_SPACES vectorization**: `IS_SPACES(field)` → `field.str.strip().eq("")`
@@ -495,7 +529,7 @@ The generated `helper_functions.py` provides a complete runtime library:
495
529
  cd informatica_python
496
530
  pip install -e ".[dev]"
497
531
 
498
- # Run tests (663 tests)
532
+ # Run tests (700 tests)
499
533
  pytest tests/ -v
500
534
  ```
501
535
 
@@ -15,9 +15,9 @@ informatica_python/utils/datatype_map.py,sha256=iLOYg-iBKT4rMecGbrFkTpJj4yqs5S9H
15
15
  informatica_python/utils/expression_converter.py,sha256=ynprsvZGvavML3Y8C485GyjaoqQ-k67OESXHShafeTo,48244
16
16
  informatica_python/utils/lib_adapters.py,sha256=1ZtuMbgDg9Ukf-OF_EG1L_BeeR-6JQk8Kx3WwMfvNRU,6516
17
17
  informatica_python/utils/sql_dialect.py,sha256=_IHJbfu8a3mT_OvHpybgSfZKqz6mwVy5ItTKDRChqnU,5461
18
- informatica_python-1.9.8.dist-info/licenses/LICENSE,sha256=77RaRDdXgey1D90YZAjXqEQdBxWfvUQqLQX3pC1qjUE,1061
19
- informatica_python-1.9.8.dist-info/METADATA,sha256=YErpXHS5T-sSTEUwENMiaCWaYhj6xiQALyyLZACrc2g,26097
20
- informatica_python-1.9.8.dist-info/WHEEL,sha256=PovZm1ExVWmrRefZoXCfejlbKLnQI5SVIf1SWRV4QQI,97
21
- informatica_python-1.9.8.dist-info/entry_points.txt,sha256=030jjTrx-1oRRQ16HZz52rdcKS8R8_llnymsTUtn_Xc,67
22
- informatica_python-1.9.8.dist-info/top_level.txt,sha256=Dngg-WNteYi22XAJU2XKAQS8aZ52yM2LYC0tzxrlbVQ,19
23
- informatica_python-1.9.8.dist-info/RECORD,,
18
+ informatica_python-1.9.9.dist-info/licenses/LICENSE,sha256=77RaRDdXgey1D90YZAjXqEQdBxWfvUQqLQX3pC1qjUE,1061
19
+ informatica_python-1.9.9.dist-info/METADATA,sha256=2NqepCsEQA7-10Pa-XAmaAnaGgD4eGkWCfw095zJ7GE,29558
20
+ informatica_python-1.9.9.dist-info/WHEEL,sha256=PovZm1ExVWmrRefZoXCfejlbKLnQI5SVIf1SWRV4QQI,97
21
+ informatica_python-1.9.9.dist-info/entry_points.txt,sha256=030jjTrx-1oRRQ16HZz52rdcKS8R8_llnymsTUtn_Xc,67
22
+ informatica_python-1.9.9.dist-info/top_level.txt,sha256=Dngg-WNteYi22XAJU2XKAQS8aZ52yM2LYC0tzxrlbVQ,19
23
+ informatica_python-1.9.9.dist-info/RECORD,,