Hi there,
I am trying to use Python code (which is written externally) in FME by using Python Caller. The purpose of the python program is to create two new attributes after performing manipulation on existing attributes. For this purpose, I create a data frame in the ___init__ of the Python caller, then I use the input function to capture the data that come from different blocks of FME transformation and then do the data manipulation in the close function of Python caller. Now the problem is that this structure slows down the program. I suspect it because of the way I capture the data in the data frame. I have two questions:
1) am I following the right approach to populate the data frame? Is there any better way (quicker) of the populating data frame?
2) Could you please also comment on my general structure of the Python code in Python caller i.e. defining data frame in __init__ function, populating data frame in input function, and final calculation is done in close function?
Regards
Yasir