I am new in FME and have a table with 10 columns. Every column contains different values.
I want to create a new column, which contains a combination of the other columns and for every combination of the values, there is a specific name.
That means I want to create classes from the other values.
Here a short example. I have 4 columns. The new column is based on the combination of other columns. If a=12
, b=1
, c=41
and d=Alpha
then the new Value = Object 1
and so on.
Which is the best transformer for my task?
Best Answer
The answer by @buddiebubba is a good way to go; but I'll post another method anyway.
Add a Deaggregator transformer and use your combination of attributes for the group-by setting. Set a List name:
Now add a Counter to create an ID number, plus a Deaggregator:
That basically gives you a unique ID for each set of values using a single transformer. It's just a number though, so if you want Object 1, Object 2, etc instead of 1, 2, 3, etc then you can use a StringConcatenator to add "Object " as a prefix to each value.
Then you don't need to do the FeatureMerging, or filter out unique combinations. Just be careful with the Aggregator/Deaggregator parameters to ensure you get the right attributes.