Hello,
I've written a Python script that performs some data extraction and saves the results to a dictionary. I now need to expose these keys and values as attributes to FME.
My Python code is simply as follows:
feature = fmeobjects.FMEFeature()
for keys, values in row.items():
feature.setAttribute(keys, values)
self.pyoutput(feature)
The only issue is that both the length of the dictionary and names of the key value pairs will be changing on a very regular basis. This essentially means that I do not have any fixed names that I can expose.
If possible, I'm looking for a solution such as assigning the attributes to a parameter and then passing this parameter to the 'Attributes to Expose' box within the Python Caller.
Is anything like this possible?
Thanks,
Jamie