Skip to main content

I'm looking for some ideas on the best way to update an existing SDE feature class that I'm using as a reader in my workspace. Let's call it FC 1. It's a compilation of active and inactive parcels. I'm using FC 2 as a reader as well and I need to compare the two feature classes. If parcels have been removed from FC 2, then I need to update a field called "Inactive" in FC 1 to "YES". So as I'm writing it out, how do I get that end result to also be the reader for the beginning of the process? This is something that will run nightly. Thanks in advance for your ideas!

You will probably use either a featuremerger with a tester to compare your two datasets or a changedetector but i am not sure the change detector will work since you are comparing two seperate FC's whihc might not have the same attributes.

 

For updating the SDE Feature class I can recommend using an attribute keeper to send through only the attributes you want to update on your FC 1. For example your FC 1 has 100 features that each have 20 attributes and you want to update the value of "MyTestAttribute" in the SDE, you send through the 100 features but you don't need to send all 20 attributes, you only need to keep the OBJECTID and the "MyTestAttribute". This is also safer because it ensures that you don't accidentally change the some of the other attribute values in your SDE Feature Class. You need the OBJECTID attribute to match your FME features to the features that are in the SDE.

 

For writing I generally use a FeatureWriter instead of a classic writer so I am giving you some settings for the FeatureWriter:

 

FeatureWriter Settings for updating SDE table


Thanks so much for your response and advice. I'll give it a try!


Reply