I have a hypothetical scenario. I have a dataset, lets call it
MonkeyCages. I have another dataset, lets call it Monkeys. Its a one to
many scenario, so one MonkeyCage may have many different MonkeyTypes in the
Monkeys dataset. Each MonkeyType has a seperate record within Monkeys for
each MonkeyCage. I want to change this so that each MonkeyCage has an
attribute with all the Monkeys in that particular cage.
So I concatenate all my Monkeys with a ; seperator in a list. Great.
But I have too many Monkeys. I have a character limit on my output
attribute of 255 characters, and I have that many Monkeys that some of
my MonkeyCages exceed this. So once my MonkeyType length exceeds 255 I
need to split it and write to a MonkeyType_2 attribute. But if I split the
string at 255 characters I am going to cut my Monkeys in half. Since this
will be searched on, the split needs to happen at the last seperator.
Otherwise my Chuacian monkey might not get detected as it is now a Chua
monkey and a cian monkey.
I could probably get a python code up and running that does this quite
easily, but I would have to expand a little on my knowledge of python esp
in regards to integrating with FME.
And FME tells me not to do this unless I am absolutely sure none of their
many transformer will provide the required function. I have spent a half
day looking through various string / text / list tools but haven't come up
with any out of the box solution, so I thought I would throw this question
out to the ether to see if anyone knows how to do this out of the box.
No monkeys have been harmed in the making of this workbench... yet.