AnsweredAssumed Answered

Arcpy - Compare values from 2 feature classes

Question asked by timdun on Jul 24, 2018
Latest reply on Jul 24, 2018 by timdun

Hi all,

I'm trying to compare data values in 2 separate feature classes and find out what has changed.

 

FCnew | FIELDA (shapefile or feature class)

FCmaster | FIELDA (feature class in a fgdb)

 

FCnew is periodically being updated by external source - this can have new values or have original values removed.

FCmaster is the master table I manage. This consists of the original FCnew values, and will change periodically from the FCnew.

What I currently do in arcpy is join a master set of objects to FCnew attributes and then truncate FCmaster and append current records.

Now I want to show what has changed as well....ideally saved to a text file.

So all I want to do is compare the 2 fields (FIELDA) and print out what values are different.

I've had a look at table compare etc... but find it hard to just tell me what values have changed from one field.

I was thinking of building dictionaries of each set in arcpy and somehow comparing those lists?

Any help would be greatly appreciated.

Just put me onto the right course....!

 

Using ArcGIS Desktop 10.6.1

 

Thanks

Outcomes