What is the best mechanism to do this?
I do not think you can export a FGDB and retain the GLOBALIDs????
Have not tried with tables, but for my HFS's, I make a list of the GLOBAL ID's in the HFS, and another list of the GLOBAL ID's in my SDE data. Then, if the GID is in the HFS, but NOT in the SDE data, add that to a separate list that I can iterate through later.(AddPostList).
I then iterate through that list and append the data from the HFS to my SDE FC making sure to use the preserveGlobalIDs=True.
L1Post = r"https://services3.arcgis.com/onlinesource/FeatureServer/1" Post = r'Database Connections\SignDatabase.sde\SignsDatabase.DBO.Posts' with arcpy.EnvManager(preserveGlobalIds=True, scratchWorkspace=r"\\pathto\scratch.gdb", workspace=r"\\pathto\Default.gdb"): Post = arcpy.management.Append(inputs=[L1Post], target=Post, schema_type="TEST", field_mapping="", subtype="", expression="GlobalID IN ('" + '\',\''.join(AddPostList) + "')")[0]
This will keep the GLOBALID and the attachments as it copies them into the SDE data.
R_
I think I had to do this once. I'm not positive, but I think the process was something like this:
The limitation is going to be with #2. I believe eGDB appended to FGDB doesn't work, but not sure about FGDB to eGDB. You may need to experiment with a test case.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.