Preserve GlobalID on Append

10202
12
02-23-2017 08:01 AM
Status: Open
Labels (1)
AllanBenvin
New Contributor III

In our environment we have several databases including a maintenance and a published environment that we replicate data to. Because or maintenance database has feature datasets (edit focused) and our published database has different feature datasets (more consumer focused) we are unable to use geodatabase replication. If data resides in a feature dataset in the source the same feature dataset must exist in the target. Because of this we have been using our own custom replication. In our replication we still want to maintain GlobalIDs in both databases, we do not want them to be recalculated as they are when you append. To maintain the GlobalIDs we have had to add an additional GUID field to our published data that we can map the GlobalID to when we append new records. This works, but it involves extra logic, an extra column and more processing time.

I recently stumbled across an environment setting in ArcGIS Pro called PreserveGlobalIDs that can be used during an append operation. This seemed quite useful as it could eliminate all the jiggery pokery we are doing now. I tried it out and there seem to be some limitations that make it pretty much useless.

The documented usage notes are below:

      (from: http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/preserve-globalids.htm)

  • This is useful for workflows where the Global ID value for the row is required to stay the same when exporting or appending data.
  • For the Append tool, this environment only applies to enterprise geodatabase data and will only work on data that has a Global ID field with a unique index. If the Global ID field does not have a unique index, the tool may fail. To add a unique index to your Global ID field, you can use the Add Attribute Index geoprocessing tool.

The problems I have found with this are:

1) Works only in ArcGIS Pro, this is not available in ArcGIS Desktop 10.5.

2) Requires a unique index on the GlobalID column.

  •    When you create a layer in ArcGIS Pro or ArcCatalog and add a GlobalID column, the software automatically adds a non-unique index.
  • ArcGIS Desktop does not allow the user to remove the GlobalID index.
  • The GlobalID index is created as non-unique so that versioning can be supported.
  • A manual change to a system generated index is required to use this option. This manual change is in direct violation of rules enforced by other ESRI software.

I would like to see the preserveGlobalIDs setting supported in ArcGIS Desktop and to also be supported on GlobalID fields with a non-unique index as is created by the ESRI software.

12 Comments
StefanThorn2

Hello Alex,

A late reply but I have managed a bit different. Because I had to keep GlobalIDs and have a transformation the same time.

- I imported the 10.5 model in ArcGIS Pro

- I did your step 6 for all FC in the model

Then I saved it as a python script and manually I have to make sure the local variables where correct written because this was not properly don by Pro (with some help from colleague with python experiences)

- I added the pyhtonscipt to a new model and the nice thing about the model are the geoprocessing environment settings. Here you can set the transformation of the coordinates.

So i was able to import and transform from a FGDB to a ArcGIS Server database.

# Set Geoprocessing environments
arcpy.env.outputCoordinateSystem = "PROJCS['RD_New',GEOGCS['GCS_Amersfoort',DATUM['D_Amersfoort',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Double_Stereographic'],PARAMETER['False_Easting',155000.0],PARAMETER['False_Northing',463000.0],PARAMETER['Central_Meridian',5.38763888888889],PARAMETER['Scale_Factor',0.9999079],PARAMETER['Latitude_Of_Origin',52.15616055555555],UNIT['Meter',1.0]]"
arcpy.env.transferGDBAttributeProperties = "true"
arcpy.env.transferDomains = "true"
arcpy.env.maintainAttachments = "true"
arcpy.env.qualifiedFieldNames = "false"
arcpy.env.parallelProcessingFactor = "3"
arcpy.env.geographicTransformations = "Amersfoort_To_WGS_1984_4X"
arcpy.env.preserveGlobalIds = "true"

regards,

Stefan

NicoleSulzberger

For FeatureLayer on ArcGIS Online, I managed to do it with the following step:

1. Take FeatureLayer offline -> local FileGeoDB will be created with a FeatureClass in it.

2. Append Features from a local featureclass into this FeatureClass with PreserveGlobalIds enabled

3. Sync FeatureLayer with ArcGIS Online