Skip to main content
Solved

How to capture writer feature count per feature type?

  • Jan 28, 2019 2:34 PM UTC
  • 6 replies
  • 212 views

aguan
Supporter
Forum|alt.badge.img+11

Is there a generic way to extract the feature count for each feature type in the writer? For example, I would like to capture this information either in the same workspace, or from the log file's Feature Written Summary section. I would like to capture this info for each updated feature type to a central location for review and reporting. Most of our FME processes are running on FME server.

Best answer by david_r

By far the easiest (in my opinion) is to use the FeatureWriter rather than the regular writers. You can then use a ListExploder on the Summary _feature_type{} list, which will contain the counts for each feature type. You can then pass those values to a second FeatureWriter or a regular writer to update whatever it is you need.

View original
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.

6 replies

david_r
Celebrity
  • Best Answer
  • Jan 28, 2019 2:36 PM UTC

By far the easiest (in my opinion) is to use the FeatureWriter rather than the regular writers. You can then use a ListExploder on the Summary _feature_type{} list, which will contain the counts for each feature type. You can then pass those values to a second FeatureWriter or a regular writer to update whatever it is you need.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • Jan 28, 2019 5:02 PM UTC

By far the easiest (in my opinion) is to use the FeatureWriter rather than the regular writers. You can then use a ListExploder on the Summary _feature_type{} list, which will contain the counts for each feature type. You can then pass those values to a second FeatureWriter or a regular writer to update whatever it is you need.

@david_r, thanks, will give it a try.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • Jan 29, 2019 2:48 PM UTC

By far the easiest (in my opinion) is to use the FeatureWriter rather than the regular writers. You can then use a ListExploder on the Summary _feature_type{} list, which will contain the counts for each feature type. You can then pass those values to a second FeatureWriter or a regular writer to update whatever it is you need.

@david_r. Created a customer transformer to take the FeatureWriter's Summary port and capture the feature type and write count and save them to a table Data_Update_History. Works great. The problem is now the FME server only reports the Feature Written to Data_Update_History table which is always "1" for the workspace run, rather than the feature written by the FeatureWritter. Is there a way to configure this to report the features written by the FeatureWriter?


david_r
Celebrity
  • Jan 29, 2019 3:13 PM UTC

@david_r. Created a customer transformer to take the FeatureWriter's Summary port and capture the feature type and write count and save them to a table Data_Update_History. Works great. The problem is now the FME server only reports the Feature Written to Data_Update_History table which is always "1" for the workspace run, rather than the feature written by the FeatureWritter. Is there a way to configure this to report the features written by the FeatureWriter?

This is a known limitation, I've posted a workaround using a Cloner and a NULL writer here:

https://knowledge.safe.com/content/idea/48251/include-featurewriter-counts-in-the-total-features.html

Please also consider voting for the idea to get this fixed :-)


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • Jan 29, 2019 3:51 PM UTC

This is a known limitation, I've posted a workaround using a Cloner and a NULL writer here:

https://knowledge.safe.com/content/idea/48251/include-featurewriter-counts-in-the-total-features.html

Please also consider voting for the idea to get this fixed :-)

@david_r The FME log includes count for featurewriter in 2018.1. Yes I would vote to include the featurewriter counts in FME server.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • Jan 29, 2019 4:03 PM UTC

@david_r The FME log includes count for featurewriter in 2018.1. Yes I would vote to include the featurewriter counts in FME server.

The FME server report writer count should include both featurewritter and conventional writer.