Skip to main content

I am looking for a type of loop or other solution where I can update my input data and perform an analysis. The output will effect the input data and so on. A kind of loop. Is that possible to create in FME? My workbench until now is attached to this post.

Currently I am working with a large tabel. The input data looks like the figure shown below:

Portal_IDVTG_VWHVan-naar11000.005-60113000.003-40012000.005-60533000.002-20233500.003-40144000.005-60144500.002-202

My first step was to use the Aggregator and set GroupBy to Portal_ID. VTG_VWH values are combined using 'sum'. 'Van-naar' is used for the Count attribute. The output:

Portal_IDVTG_VWHCount_Van-naar16000.00336500.00248500.002

My next step was to extract the row with highest value for VTG_VWH (Portal_ID =4). That needs to be my first output, one row with Portal_ID 4 (Result 1).

---------------------------------------------------------------------------------------------------------------------------------------------

Next I want to filter the input data for all records where Portal_ID =4:

Portal_IDVTG_VWHVan-naar44000.005-60144500.002-202

Now I want to repeat the whole process again but without the found values for the attribute 'Van-naar'. My updated input data would then become:

Portal_IDVTG_VWHVan-naar13000.003-40012000.005-60533500.003-401

Furthermore I would continue with the Aggregator + more transformers again using updated input data. The result would be Portal_ID which has then the highest value for VTG_VWH. Thats need to be written as Result 2.

Actually my table is much larger. I have 178 unique Portal_ID's which should result in a one-row table for each Portal_ID (178 one-row tables).

Do you have any idea how I could use FME to address my questions as described?

Ugh, Iterative blocking transformers. FME does not handle that scenario gracefully. I think this custom transformer does what you want. Since it's blocking it needs to be linked.

iterativeelimination.fmx

 

Though to be honest, I would most likely apply a python solution to this, if it were in my production environment.


Reply