informatica-python 1.1.0__tar.gz → 1.1.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.
- {informatica_python-1.1.0 → informatica_python-1.1.1}/PKG-INFO +1 -1
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/converter.py +30 -5
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/error_log_gen.py +45 -19
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/PKG-INFO +1 -1
- {informatica_python-1.1.0 → informatica_python-1.1.1}/pyproject.toml +1 -1
- {informatica_python-1.1.0 → informatica_python-1.1.1}/README.md +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/__init__.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/cli.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/__init__.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/config_gen.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/helper_gen.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/mapping_gen.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/sql_gen.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/workflow_gen.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/models.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/parser.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/utils/__init__.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/utils/datatype_map.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/utils/expression_converter.py +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/SOURCES.txt +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/dependency_links.txt +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/entry_points.txt +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/requires.txt +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/top_level.txt +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/setup.cfg +0 -0
- {informatica_python-1.1.0 → informatica_python-1.1.1}/tests/test_converter.py +0 -0
|
@@ -235,7 +235,9 @@ class InformaticaConverter:
|
|
|
235
235
|
if tgt.xmlinfo:
|
|
236
236
|
d["xmlinfo"] = {"xml_type": tgt.xmlinfo.xml_type, "root_element": tgt.xmlinfo.root_element}
|
|
237
237
|
if tgt.groups:
|
|
238
|
-
d["groups"] = [{"name": g.name, "type": g.type} for g in tgt.groups]
|
|
238
|
+
d["groups"] = [{"name": g.name, "type": g.type, "fields": [self._field_to_dict(f) for f in g.fields]} for g in tgt.groups]
|
|
239
|
+
if tgt.keywords:
|
|
240
|
+
d["keywords"] = [{"name": k.name, "value": k.value} for k in tgt.keywords]
|
|
239
241
|
return d
|
|
240
242
|
|
|
241
243
|
def _transformation_to_dict(self, tx):
|
|
@@ -257,7 +259,9 @@ class InformaticaConverter:
|
|
|
257
259
|
if tx.erp_info:
|
|
258
260
|
d["erp_info"] = {"name": tx.erp_info.name, "erp_type": tx.erp_info.erp_type}
|
|
259
261
|
if tx.groups:
|
|
260
|
-
d["groups"] = [{"name": g.name, "type": g.type} for g in tx.groups]
|
|
262
|
+
d["groups"] = [{"name": g.name, "type": g.type, "fields": [self._field_to_dict(f) for f in g.fields]} for g in tx.groups]
|
|
263
|
+
if tx.metadata_extensions:
|
|
264
|
+
d["metadata_extensions"] = [self._meta_ext_to_dict(me) for me in tx.metadata_extensions]
|
|
261
265
|
if tx.sap_functions:
|
|
262
266
|
d["sap_functions"] = [self._sap_function_to_dict(sf) for sf in tx.sap_functions]
|
|
263
267
|
return d
|
|
@@ -322,7 +326,13 @@ class InformaticaConverter:
|
|
|
322
326
|
"transformations": [self._transformation_to_dict(tx) for tx in mapplet.transformations],
|
|
323
327
|
"connectors": [{"from_field": c.from_field, "from_instance": c.from_instance,
|
|
324
328
|
"to_field": c.to_field, "to_instance": c.to_instance} for c in mapplet.connectors],
|
|
325
|
-
"instances": [{"name": i.name, "type": i.type, "transformation_name": i.transformation_name
|
|
329
|
+
"instances": [{"name": i.name, "type": i.type, "transformation_name": i.transformation_name,
|
|
330
|
+
"associated_source_instances": [{"name": a.name, "source_instance": a.source_instance} for a in i.associated_source_instances]}
|
|
331
|
+
for i in mapplet.instances],
|
|
332
|
+
"metadata_extensions": [self._meta_ext_to_dict(me) for me in mapplet.metadata_extensions],
|
|
333
|
+
"map_dependencies": [{"name": md.name, "from_mapping": md.from_mapping, "to_mapping": md.to_mapping} for md in mapplet.map_dependencies],
|
|
334
|
+
"field_dependencies": [{"name": fd.name, "from_field": fd.from_field, "from_instance": fd.from_instance,
|
|
335
|
+
"to_field": fd.to_field, "to_instance": fd.to_instance, "expression": fd.expression} for fd in mapplet.field_dependencies],
|
|
326
336
|
}
|
|
327
337
|
|
|
328
338
|
def _session_to_dict(self, session):
|
|
@@ -350,6 +360,7 @@ class InformaticaConverter:
|
|
|
350
360
|
],
|
|
351
361
|
"config_references": session.config_references,
|
|
352
362
|
"components": session.components,
|
|
363
|
+
"metadata_extensions": [self._meta_ext_to_dict(me) for me in session.metadata_extensions],
|
|
353
364
|
}
|
|
354
365
|
|
|
355
366
|
def _task_to_dict(self, task):
|
|
@@ -360,13 +371,17 @@ class InformaticaConverter:
|
|
|
360
371
|
}
|
|
361
372
|
if task.timer:
|
|
362
373
|
d["timer"] = {"name": task.timer.name, "start_type": task.timer.start_type,
|
|
363
|
-
"start_date": task.timer.start_date, "start_time": task.timer.start_time
|
|
374
|
+
"start_date": task.timer.start_date, "start_time": task.timer.start_time,
|
|
375
|
+
"end_type": task.timer.end_type, "end_date": task.timer.end_date, "end_time": task.timer.end_time}
|
|
376
|
+
if task.metadata_extensions:
|
|
377
|
+
d["metadata_extensions"] = [self._meta_ext_to_dict(me) for me in task.metadata_extensions]
|
|
364
378
|
return d
|
|
365
379
|
|
|
366
380
|
def _config_to_dict(self, cfg):
|
|
367
381
|
return {
|
|
368
382
|
"name": cfg.name, "description": cfg.description, "is_valid": cfg.is_valid,
|
|
369
383
|
"attributes": [{"name": a.name, "value": a.value} for a in cfg.attributes],
|
|
384
|
+
"metadata_extensions": [self._meta_ext_to_dict(me) for me in cfg.metadata_extensions],
|
|
370
385
|
}
|
|
371
386
|
|
|
372
387
|
def _scheduler_to_dict(self, sched):
|
|
@@ -380,10 +395,18 @@ class InformaticaConverter:
|
|
|
380
395
|
d["start_options"] = sched.start_options.attributes
|
|
381
396
|
if sched.end_options:
|
|
382
397
|
d["end_options"] = sched.end_options.attributes
|
|
398
|
+
if sched.schedule_options:
|
|
399
|
+
d["schedule_options"] = sched.schedule_options.attributes
|
|
383
400
|
if sched.recurring:
|
|
384
401
|
d["recurring"] = sched.recurring.attributes
|
|
402
|
+
if sched.custom:
|
|
403
|
+
d["custom"] = sched.custom.attributes
|
|
385
404
|
if sched.daily_frequency:
|
|
386
405
|
d["daily_frequency"] = sched.daily_frequency.attributes
|
|
406
|
+
if sched.repeat:
|
|
407
|
+
d["repeat"] = sched.repeat.attributes
|
|
408
|
+
if sched.scheduler_filter:
|
|
409
|
+
d["filter"] = sched.scheduler_filter.attributes
|
|
387
410
|
return d
|
|
388
411
|
|
|
389
412
|
def _shortcut_to_dict(self, sc):
|
|
@@ -417,9 +440,11 @@ class InformaticaConverter:
|
|
|
417
440
|
for v in wf.variables
|
|
418
441
|
],
|
|
419
442
|
"events": [
|
|
420
|
-
{"name": e.name, "event_type": e.event_type, "description": e.description
|
|
443
|
+
{"name": e.name, "event_type": e.event_type, "description": e.description,
|
|
444
|
+
"attributes": [{"name": a.name, "value": a.value} for a in e.attributes]}
|
|
421
445
|
for e in wf.events
|
|
422
446
|
],
|
|
423
447
|
"attributes": [{"name": a.name, "value": a.value} for a in wf.attributes],
|
|
424
448
|
"metadata": wf.metadata,
|
|
449
|
+
"metadata_extensions": [self._meta_ext_to_dict(me) for me in wf.metadata_extensions],
|
|
425
450
|
}
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/error_log_gen.py
RENAMED
|
@@ -228,10 +228,36 @@ def generate_error_log(folder: FolderDef, parser_errors=None, parser_warnings=No
|
|
|
228
228
|
lines.append("-" * 70)
|
|
229
229
|
lines.append("")
|
|
230
230
|
|
|
231
|
+
all_transformations = list(folder.transformations)
|
|
232
|
+
for m in folder.mappings:
|
|
233
|
+
all_transformations.extend(m.transformations)
|
|
234
|
+
for mpl in folder.mapplets:
|
|
235
|
+
all_transformations.extend(mpl.transformations)
|
|
236
|
+
|
|
237
|
+
all_instances = []
|
|
238
|
+
for m in folder.mappings:
|
|
239
|
+
all_instances.extend(m.instances)
|
|
240
|
+
for mpl in folder.mapplets:
|
|
241
|
+
all_instances.extend(mpl.instances)
|
|
242
|
+
|
|
243
|
+
me_count = len(folder.metadata_extensions)
|
|
244
|
+
me_count += sum(len(s.metadata_extensions) for s in folder.sources)
|
|
245
|
+
me_count += sum(len(t.metadata_extensions) for t in folder.targets)
|
|
246
|
+
me_count += sum(len(m.metadata_extensions) for m in folder.mappings)
|
|
247
|
+
me_count += sum(len(mpl.metadata_extensions) for mpl in folder.mapplets)
|
|
248
|
+
me_count += sum(len(s.metadata_extensions) for s in folder.sessions)
|
|
249
|
+
me_count += sum(len(w.metadata_extensions) for w in folder.workflows)
|
|
250
|
+
me_count += sum(len(t.metadata_extensions) for t in folder.tasks)
|
|
251
|
+
me_count += sum(len(c.metadata_extensions) for c in folder.configs)
|
|
252
|
+
me_count += sum(len(tx.metadata_extensions) for tx in all_transformations)
|
|
253
|
+
|
|
254
|
+
group_count = (
|
|
255
|
+
sum(len(s.groups) for s in folder.sources)
|
|
256
|
+
+ sum(len(t.groups) for t in folder.targets)
|
|
257
|
+
+ sum(len(tx.groups) for tx in all_transformations)
|
|
258
|
+
)
|
|
259
|
+
|
|
231
260
|
tag_counts = {
|
|
232
|
-
"POWERMART": 1,
|
|
233
|
-
"REPOSITORY": sum(1 for _ in [1]),
|
|
234
|
-
"FOLDER": 1,
|
|
235
261
|
"FOLDERVERSION": len(folder.folder_versions),
|
|
236
262
|
"SOURCE": len(folder.sources),
|
|
237
263
|
"SOURCEFIELD": sum(len(s.fields) for s in folder.sources),
|
|
@@ -241,24 +267,24 @@ def generate_error_log(folder: FolderDef, parser_errors=None, parser_warnings=No
|
|
|
241
267
|
"TARGETINDEXFIELD": sum(len(idx.fields) for t in folder.targets for idx in t.indexes),
|
|
242
268
|
"FLATFILE": sum(1 for s in folder.sources if s.flatfile) + sum(1 for t in folder.targets if t.flatfile),
|
|
243
269
|
"XMLINFO": sum(1 for s in folder.sources if s.xmlinfo) + sum(1 for t in folder.targets if t.xmlinfo),
|
|
244
|
-
"GROUP":
|
|
245
|
-
"KEYWORD": sum(len(s.keywords) for s in folder.sources),
|
|
270
|
+
"GROUP": group_count,
|
|
271
|
+
"KEYWORD": sum(len(s.keywords) for s in folder.sources) + sum(len(t.keywords) for t in folder.targets),
|
|
246
272
|
"ERPSRCINFO": sum(1 for s in folder.sources if s.erp_src_info),
|
|
247
273
|
"MAPPING": len(folder.mappings),
|
|
248
274
|
"MAPPLET": len(folder.mapplets),
|
|
249
|
-
"TRANSFORMATION":
|
|
250
|
-
"TRANSFORMFIELD": sum(len(tx.fields) for
|
|
251
|
-
"TRANSFORMFIELDATTR": sum(len(tx.field_attrs) for
|
|
252
|
-
"TRANSFORMFIELDATTRDEF": sum(len(tx.field_attr_defs) for
|
|
253
|
-
"INITPROP": sum(len(tx.init_props) for
|
|
254
|
-
"ERPINFO": sum(1 for
|
|
255
|
-
"INSTANCE":
|
|
256
|
-
"ASSOCIATED_SOURCE_INSTANCE": sum(len(i.associated_source_instances) for
|
|
257
|
-
"CONNECTOR": sum(len(m.connectors) for m in folder.mappings),
|
|
275
|
+
"TRANSFORMATION": len(all_transformations),
|
|
276
|
+
"TRANSFORMFIELD": sum(len(tx.fields) for tx in all_transformations),
|
|
277
|
+
"TRANSFORMFIELDATTR": sum(len(tx.field_attrs) for tx in all_transformations),
|
|
278
|
+
"TRANSFORMFIELDATTRDEF": sum(len(tx.field_attr_defs) for tx in all_transformations),
|
|
279
|
+
"INITPROP": sum(len(tx.init_props) for tx in all_transformations),
|
|
280
|
+
"ERPINFO": sum(1 for tx in all_transformations if tx.erp_info),
|
|
281
|
+
"INSTANCE": len(all_instances),
|
|
282
|
+
"ASSOCIATED_SOURCE_INSTANCE": sum(len(i.associated_source_instances) for i in all_instances),
|
|
283
|
+
"CONNECTOR": sum(len(m.connectors) for m in folder.mappings) + sum(len(mpl.connectors) for mpl in folder.mapplets),
|
|
258
284
|
"TARGETLOADORDER": sum(len(m.target_load_orders) for m in folder.mappings),
|
|
259
285
|
"MAPPINGVARIABLE": sum(len(m.variables) for m in folder.mappings),
|
|
260
|
-
"MAPDEPENDENCY": sum(len(m.map_dependencies) for m in folder.mappings),
|
|
261
|
-
"FIELDDEPENDENCY": sum(len(m.field_dependencies) for m in folder.mappings),
|
|
286
|
+
"MAPDEPENDENCY": sum(len(m.map_dependencies) for m in folder.mappings) + sum(len(mpl.map_dependencies) for mpl in folder.mapplets),
|
|
287
|
+
"FIELDDEPENDENCY": sum(len(m.field_dependencies) for m in folder.mappings) + sum(len(mpl.field_dependencies) for mpl in folder.mapplets),
|
|
262
288
|
"SESSION": len(folder.sessions),
|
|
263
289
|
"SESSTRANSFORMATIONINST": sum(len(s.transform_instances) for s in folder.sessions),
|
|
264
290
|
"SESSTRANSFORMATIONGROUP": sum(len(s.transform_groups) for s in folder.sessions),
|
|
@@ -273,15 +299,15 @@ def generate_error_log(folder: FolderDef, parser_errors=None, parser_warnings=No
|
|
|
273
299
|
"TIMER": sum(1 for t in folder.tasks if t.timer),
|
|
274
300
|
"CONFIG": len(folder.configs),
|
|
275
301
|
"SCHEDULER": len(folder.schedulers),
|
|
276
|
-
"WORKFLOW":
|
|
302
|
+
"WORKFLOW": sum(1 for w in folder.workflows if w.metadata.get("is_worklet") != "YES"),
|
|
277
303
|
"WORKLET": sum(1 for w in folder.workflows if w.metadata.get("is_worklet") == "YES"),
|
|
278
304
|
"TASKINSTANCE": sum(len(w.task_instances) for w in folder.workflows),
|
|
279
305
|
"WORKFLOWLINK": sum(len(w.links) for w in folder.workflows),
|
|
280
306
|
"WORKFLOWVARIABLE": sum(len(w.variables) for w in folder.workflows),
|
|
281
307
|
"WORKFLOWEVENT": sum(len(w.events) for w in folder.workflows),
|
|
282
308
|
"SHORTCUT": len(folder.shortcuts),
|
|
283
|
-
"METADATAEXTENSION":
|
|
284
|
-
"SAPFUNCTION": sum(len(tx.sap_functions) for
|
|
309
|
+
"METADATAEXTENSION": me_count,
|
|
310
|
+
"SAPFUNCTION": sum(len(tx.sap_functions) for tx in all_transformations),
|
|
285
311
|
}
|
|
286
312
|
|
|
287
313
|
for tag, count in sorted(tag_counts.items()):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/__init__.py
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/config_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/helper_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/mapping_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/sql_gen.py
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/generators/workflow_gen.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python/utils/datatype_map.py
RENAMED
|
File without changes
|
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{informatica_python-1.1.0 → informatica_python-1.1.1}/informatica_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|