Skip to main content
Solved

How to capture writer feature count per feature type?


aguan
Contributor
Forum|alt.badge.img+10
  • Contributor

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
Did this help you find an answer to your question?

6 replies

david_r
Evangelist
  • Best Answer
  • January 28, 2019

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
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • January 28, 2019
david_r wrote:

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
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • January 29, 2019
david_r wrote:

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
Evangelist
  • January 29, 2019
aguan wrote:

@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
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • January 29, 2019
david_r wrote:

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
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • January 29, 2019
aguan wrote:

@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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings