Skip to main content
Solved

I am trying to terminate a process after using a Change Detector if the number of features that are unchanged is below a threshold. What is the order of operation for fme_db_operations when sending the results to a writer?

  • October 10, 2022
  • 2 replies
  • 38 views

jasonc
Contributor
Forum|alt.badge.img+3

What is the order of operation for fme_db_operations when sending the results to a writer?  If I have a feature counter attached to the Unchanged Port of the Change detector and test the number of records, can I analyze and terminate the workbench before the Deleted, Inserted, and Updated records get processed in the Writer?

Best answer by geomancer

One way is to calculate the number of unchanged features, add that number to all other features, and then determine if you want to process those features.

Number_of_Changes

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.

2 replies

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • October 11, 2022

One way is to calculate the number of unchanged features, add that number to all other features, and then determine if you want to process those features.

Number_of_Changes


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • 571 replies
  • October 11, 2022

How about this:

Attach an AttributeCreator to each port of ChangeDetector and create the same attribute with corresponding values for each situation. This is needed to do some statistics and split features after. (ChangeDetercor might create one by default, I don't have a dataset to do change detection on right now)

Send everything to a StatisticsCalculator with GroupBy enabled on the created attribute to get Total Count.

Send Summary output port to a Tester and test for the Unchanged features to be less than you desire and the Passed port of Tester to a Terminator.

Send the Complete output port of StatisticsCalculator to a TestFilter to split features accordingly.

Limit change