Select to view content in your preferred language

ArcPy - Versioned Database Deltas

761
4
02-04-2014 06:10 AM
BriceYoung
Deactivated User
Hey Folks,

I have a quick question. Is there functionality in ArcPy or other Python Package to identify the Inserts, Updates, & Deletes between a Default and Version in SDE???

If you could point me to an example I can dig further, but I only see the ability to list versions , reconcile versions, etc???.

I need to get a list of Features for each type of transaction (Insert, Delete & Update).

The old VB.Net 2005 code I am reworking reads like this:

                pDiffCursor = VersionTable.Differences(DefaultTable, DifferenceType, Nothing)

Thanks!

Brice Young
Senior GIS Analyst / Programmer
Molpus Timberlands Management
Tags (2)
0 Kudos
4 Replies
David_JAnderson
Regular Contributor
I am wondering if an approach where queries are executed against the delta tables might work?
Unless there is a way to get to the Version Changes button in the versioning toolbar in ArcMap.
0 Kudos
BriceYoung
Deactivated User
Dave,

I have talked with some folks of the Python Team and they plan on implementing this, but not sure when.

I had the same idea with approaching this via SQL. I have a rough draft sketched out on how to do this but it may be a few weeks before I get back to it.

Basically you have to get all the state ID's for a version where State DateTime >= Version Create DateTime. However, I have to troubleshoot that I am getting ONLY my Deltas.

This will get you all the poly IDs where a change has occured and thier current attributes, but not the previous state of the attributes. So, I was thinking about using a Spatial Query to identify all the Dirty Areas and their Summary Attributes. From there you should know what records have changed.

It's not the most elegant solution, but I think it might work.

I'll post my Stored Procedure for the first step when I get it ironed out. I'd love some verification that it is working correctly. 😮

Thanks!

Brice
0 Kudos
MichaelVolz
Esteemed Contributor
Did ESRI even provide a ballpark timeframe of when this functionality might be available with ArcPy?

My organization is looking to implement this type of functionality instead of truncating and appending entire feature classes, so this functionality is of interest to me.
0 Kudos
BriceYoung
Deactivated User
Nope. No timeframe given.

They asked me to submit it to ideas.arcgis.com. If it gets promoted enough, that it would be bumped up in thier que. I plan on making the request once I get the Stored procedure roughed in.

Thanks!
0 Kudos