How do I separate these values and create a new record for each value in the fields so the table would look like this:
Thanks
Matt
How do I separate these values and create a new record for each value in the fields so the table would look like this:
Thanks
Matt
I think this data flow is a basic solution.
Notes:
"Neighbour Angle" should be removed in the upper flow, not to conflict with Supplier's "Neighbour Angle" at the FeatureMerger.
"Conflict Resolution" parameter of the ListExploders should be set to "Use Incoming List".
In addition, the PythonCaller may also be effective in this case.
-----
# Python script example
class FeatureProcessor(object):
def input(self, feature):
codes = str(feature.getAttribute('Neighbour Code')).split(',')
angles = str(feature.getAttribute('Neighbour Angle')).split(',')
for c, a in zip(codes, angles):
f = feature.clone()
f.setAttribute('Neighbour Code', c)
f.setAttribute('Neighbour Angle', a)
self.pyoutput(f)
-----
Takashi