Update AGOL Hosted Feature Service using ChangeDetector
Hello,
I am updating an existing AGOL Hosted Feature Service with changes in a File Geodatabase. The workbench in the screenshot is what I am using. The Feature Service updates no issues, and it does update the feature service.
But I have a question:
When I add 1 new feature in the file gdb (Updated FGDB Feature Class Bookmark in screenshot), I run the workbench and in the ChangeDetector it shows 1 record Inserted and 238 records updated for a total of 239 records; The only change I made was to add 1 new feature (which I expect to be in Inserted), but why would there be 238 records in Updated in the ChangeDetector when I only Inserted a single record and Updated zero records, should these 238 “Updated” records be in Unchanged?
I then reran the workbench it showed 239 records in Updated (which includes the one I added in the 1st run), but I Updated zero records so I would assume these 239 records should be in Unchanged?
The ChangeDetector Parameters I am using is in the screenshot.
Page 1 / 1
To find out what changes the ChangeDetector detected, you can create a list with changes per feature under Generate Detailed Changes List for Update Detection. When you view a feature, you can see the contents of the list in the Feature Information window.
This is easier to see when working with dual screens and displaying the results in the FME Inspector. You can default this via Tools, FME Options, tab Workbench, checkbox Inspect with Data Inspector when Visual Preview window closed. I never understood why someone would want to have the visual preview window cramped in the main workspace window, hiding the log behind it.
The changes it found are probably very small geometry changes, because each format uses a different way to save coordinates which causes very small differences. If you unfold the Check Geometry parameters, you can change the value for Vector Tolerance.
Thank you @nielsgerrits your post was somewhat helpful. I have generated a list of detailed changes in the ChangeDetector Parameters. I changed the vector tolerance from 0 (default) to 1, then to 5, then to 10. Each time I ran the workspace the results were the same, 239 records updated, and it shows fme_db_operation attribute as “UPDATE”. But I never made any updates to the original data since the 1st time I ran the workspace. I assume that if I run the workspace a 2nd or 3rd time (clear the feature cache or even turn off feature caching before doing so), if the original data was not updated, then the 239 records should be output from ChangeDetector into Unchanged.
In looking at the attribute table screenshot below, it looks like the small geometry changes you mention could be the issue. I am working with point data if that helps.
Here is what I see in Feature Inspector Window, lots of changes that I nor anyone else made to the data:
In the ChangeDetector, you have set Attribute Matching Strategy to Match All Attributes. This takes all attributes in consideration, also the unexposed attributes. This is the reason why attributes like geodb_feature_is_simple is detected as added, according to the changelist. These are technical attributes generated by FME and these differ per format, so these should differ in the different sets. Please set it to Match Selected Attributes and select the attributes you want to check. If I do this, I configure it in steps. First I only run with Update Detection Key Attributes, then I run with Check Geometry, then with Check Attributes. It is a great tool, but not an easy one :)