Skip to main content
Question

Getting special variables from the workspace and adding values on log file

  • May 24, 2018
  • 3 replies
  • 19 views

Forum|alt.badge.img

Hello,

I am working on a workspace where there are multiple blocs of transformers performing tasks

 

I want to extract the output number of features from each bloc and store it somewhere (some kind of variable or parameter of it's possible), then write in the end of the log file of the translation the output number of features resulted from each bloc with some of my personnalized text.

 

Which transformers should I Use ?

 

Thank you very much

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • May 24, 2018

You can use Counters to count the number of features after each block. Then a Sampler to split off the last feature after each Counter, its count attribute (+1 because Counters start at 0) will be the number of features processed there.


Forum|alt.badge.img
  • Author
  • 56 replies
  • May 24, 2018

You can use Counters to count the number of features after each block. Then a Sampler to split off the last feature after each Counter, its count attribute (+1 because Counters start at 0) will be the number of features processed there.

I already used the counter

 

But I am particularly interested in storing these numbers in some kind of variables on which I can perform some calculations and dispaly results on the logger in the end of the translation.

 

 


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3703 replies
  • May 24, 2018
I already used the counter

 

But I am particularly interested in storing these numbers in some kind of variables on which I can perform some calculations and dispaly results on the logger in the end of the translation.

 

 

You can merge all those outputs together on a single feature (a number of FeatureMergers or FeatureJoiners can do that) and perform your calculations there and then ultimately log it. Just make sure the attributes you use to store the counts in are different otherwise they get overwritten.