Skip to main content

Hello,


I have a problem with selecting and passing on selected parts of my table from
one transformer to another.

 


I have two datasets - GML data called Bygning, and table with specific styles,
line weights, symbology etc. From the table I need to select only those rows
that have also the Bygning name, and would be used to style the Bygning GML
data.

 


 


I do not know how to select only specific rows from my table automatically,
based on the name of the incoming GML layer. I could use AttributeFilter and
type manualy the name of the data, but I have dozens of datasets so the process
needs to be automated.

 


 


My current approach is attached. It works but is not elegant.

 

I remove all the unnecessary data from the GML
file, merge it with the table and then merge it again with data. That means I
need to load data twice and due to data being huge it takes a lot more time
than needed.

 


 


Can you guide me how to select the needed rows from the table?

 

 

Thanks!

Sample data:

I couldn't get the GML file to work so I can't test this, but have you tried just using the 2nd FeatureMerger? You're going to be reading the entire Excel file anyway...

Alternatively, if you separate the Excel contents into different sheets you can set the reader to only pick the sheet you need.


@stysiakaleksand Also unable to run your example, but trying to understand what you are trying to do,.. it may be just that you need to use a single featuremerger with a composite join, i.e. join based on 2 attributes - you can specify multiple joins each of which must be true for the merge to happen. So I think in your case that might be bygning.fme_feature_type = AllFields.GEODK_lag and bygning.Bygningstype = All_fields.vaerdi, although cannot test it/read the data so I may have mis-interpretted. Hope that helps


Thank you all for asnwers and sorry for the sample data not working. But 1spatialsmary's answer was beatifully simple and worked 🙂 thanks!


Reply