Skip to main content

Hi,

I am trying to merge two datasets, one being the primary dataset that has Levels and the second dataset that has Zones. Each level has all the zones associated to that the level. I would like to achieve a dataset that displays this merged dataset. I have created a small sample of the actual larger dataset below.

Levels and Zones FME DatasetI think the solution involves some sort of list handling but I have tried out several list transformers but so far haven’t been successful, I would like the desired outcome in columns as shown above and not in rows as I think can be achieved by exploding attributes. 

If this cannot be achieved using transformers, I am happy to use a python script inside the pythoncaller if someone doesn’t mind sharing a script.

Appreciate any advice either way.  Thanks in advance.

Use an Aggregator to merge the secondary dataset into one (building a list out of the required attributes).

Next use a Feature Merger to join the aggregated feature (supplier) to the primary dataset(Requester) - use 1 = 1 in the feature merger.

This should give you the primary dataset each with a list attribute containing all​ secondary values.

Next use a ListExploder​, this should create a single feature for each element in the list.


Thank you @virtualcitymatt​ that suggestion worked a treat and I got the output I was looking for. I wasn’t aware that you could merge using the 1 = 1 in feature merger something I will have to look up and see what else I can merge beside the incoming attributes which I thought were obligatory. Thanks again. 


Reply