Hello,
After creating a Utility Network in an enterprise geodatabase, I noticed that an index had been created on both globalId and objectID fields, and that this index was not unique.
When loading data into feature classes, the "Preserve globalId" option generates error 003340.
I thought that, by design, any index on the globalID field should be unique. Could this be related to the archiving of the feature class? Is there a restriction on adding a unique identifier to this field?
For example, in a new UN created in a mobile geodatabase, there are two different unique indexes on the GID and OID fields.
Unique idx in mobile gdb
Of course, I meant "Append," not "Add".
After further testing, I'm now certain that enabling branch versioning and archiving is causing the incorrect index in the geodatabase:
I just tested in a new geodatabase, with a new schema and a new UN. Right after creating the UN (using the Stage Utility Network tool), the FCs have two unique indexes on the GID and the OID. But as soon as I enable branch versioning and archiving, the OID index is removed, and the other index now contain GID and OID fields and is no longer unique.
Tested with Pro 3.3.7 / AGE 11.3 but also seen with Pro 3.5.5 / AGE 11.5.
I am logging a case.
Thanks again for you help
@PierreloupDucroix index issue aside ... I had some issues getting the Append to work properly, until I read the doc more closely and realized that the Preserve Global ID option will only be respected on append (at the REST level) when defining a Matching Field, which places the tool in an Upsert Mode.
Oh, that's really interesting!
I also came across this REST documentation, but I wasn't sure if the append tool allowed updates via the REST API and in UPSERT mode.
Now I know it does, but I think the "Optimize performance for feature services" parameter is required in addition to a Matching Field on GID :
The Optimize performance for feature services parameter is only supported when the target dataset supports feature service append capabilities. When this parameter is checked, the following will be done:
I'm running tests to find out.