Select to view content in your preferred language

Using Append_management for all versions

857
3
Jump to solution
03-08-2018 01:59 PM
NaciDilekli
Frequent Contributor

I have a rather complicated enterprise geodatabase version scheme that looks like this:

Multiple projects with subprojects

Periodically I get updates to our data inventory, and I would like to update all the versions together. I tried the append_management command as follows:

# some code

for fds in arcpy.ListDatasets('','feature') + ['']:

    for fc in arcpy.ListFeatureClasses('','',fds):

        inputPath = os.path.join(arcpy.env.workspace, fds, fc)
        outputPath = os.path.join(outLocation, sdeString + fc)
        arcpy.Append_management(inputPath, outputPath, schemaType, fieldMappings, subtype)
‍‍‍‍‍‍‍

However, this only updated the DEFAULT SDE version. What's the best strategy to push those changes to the child versions as well? I would like to be able to do this programatically.

Thanks, Naci

0 Kudos
1 Solution

Accepted Solutions
NaciDilekli
Frequent Contributor

Finally, I figured out the correct workflow for this. I had to change to the child version (ChangeVersion_management) before appending. Then I can propagate the changes from children to parents and grandparent. This is the only way reconciliation works.

View solution in original post

0 Kudos
3 Replies
JoshuaBixby
MVP Esteemed Contributor

If the changes are destined for the Default version, and you want all of those changes to propagate out to the child versions, then Reconciling a version—ArcGIS Help | ArcGIS Desktop using Reconcile Versions—Help | ArcGIS Desktop  .

NaciDilekli
Frequent Contributor

Thank you for your reply. I have been trying to post the changes to the child versions, but the Post Changes button is always disabled while the parent SDE version is active. I did this by posting changes from the child version to the parent. That seemed to work and got the additions from the parent version. Is that the correct workflow?

Thanks

0 Kudos
NaciDilekli
Frequent Contributor

Finally, I figured out the correct workflow for this. I had to change to the child version (ChangeVersion_management) before appending. Then I can propagate the changes from children to parents and grandparent. This is the only way reconciliation works.

0 Kudos