Skip to main content
Hi there

 

I have a fairly complex workspace and I would like to record the number of items that come out numerous transformers (in particulat feature mergers). What I have done so far is adding a statistic calculator and an attribute creator after each important transformer and I write  the data into a csv file.. The output is presented in two columns: definition of count and count. The problem is that it makes the workspace very messy as it adds a lot of connectors. Is there a simpler way of doing this? This info is recorded by FME anyway as it is displayed on the connectors and in the log file...just wondering if there is an simpler way to log numerous counts into a csv file...thanks
I'd say you are on the right lines. Though to perhaps make things neater I would bundle your Counter and StatisticsCalculator into a Custom Transformer called something like the 'FeatureCounter' then you can reuse that function in a number of places. Better still if you ad a VariableSetter into the same Transformer and make sure you give each Variable a different name, you could add as the very last Transfromer(s) (one per variable to be retrieved) a VariableRetriever and grab all the feature counts you have generated in your entire workspace and insert them all into a single output file like a CSV. That way you just have one neat write process to create your custom log file.

 

 

http://docs.safe.com/fme/html/FME_Transformers/FMETransformers.htm#transformers/variablesetter.htm

 

 

http://docs.safe.com/fme/html/FME_Transformers/FMETransformers.htm#transformers/variableretriever.htm

 

 

Hope that helps.

Reply