I am trying to get attribute names from multiple input MapInfo files into one column in Excel with PythonCaller.
I can get it to print in the Log but it doesn't go out to the Excel reader. Not too sure what the problem is - I use the script below:
import fmeobjects
def processFeature(feature):
pass
class FeatureProcessor(object):
def __init__(self):
pass
def input(self,feature):
feature.removeAttrsWithPrefix('mapinfo_')
feature.removeAttrsWithPrefix('fme_')
feature.removeAttrsWithPrefix('multi_')
attrNames = feature.getAllAttributeNames()
inputAttrNames = []
for attrname in attrNames: inputAttrNames.append(attrname)
feature.setAttribute('_inputAttrNames', inputAttrNames)
self.pyoutput(feature)
def close(self):
pass
I have also tried in the for loop -
for attrname in attrNames:
feature.setAttribute('_inputAttrNames', attrname)
Thanks!!