How to extract features inserted, deletesd and updated

3314
4
11-09-2015 10:57 AM
JoseSanchez
Occasional Contributor III

Hello everyone,

the goal is to create an application or script that extracts by feature class all the records that were created, deleted and updated from the previous day, and then replicate them in a production database used only for read only access.

How do you select and extract from a feature class all the features that were inserted, deleted and updated, since for example yesterday?

thanks

0 Kudos
4 Replies
WesMiller
Regular Contributor III

Are you using sde you could set up replication. What is synchronization?—ArcGIS Help | ArcGIS for Desktop

0 Kudos
JoseSanchez
Occasional Contributor III

Hi,

what are the pros and cons of using SDE Synchronization versus running a script that extracts all inserts, updates and deletes and replicates them to other instances?

Thank you

0 Kudos
WesMiller
Regular Contributor III

For sde sync there is an out of the box tool to handle synchronization. As for a script i've only seen one that does it by @Bruce Harold you can find it here Re: Python hashlib to compare shapefiles\feature classes , for large data i would stick to the out of the box tool

0 Kudos
MikeCusi
Occasional Contributor II

I can't say that one can somehow track a record that is deleted from a feature class as it won't be there tomorrow if it was deleted today, unless you had a copy of the feature class today and then compare it to tomorrows.

As for insertions and updates, if you add 2 date fields in your feature class and then enable Editor Tracking, then assign the create date field and the edit date field appropriately, then you should have a way of tracking when a record was created and/or edited.

0 Kudos