I have created version 2 of my feature services and need to transfer the data from the old ones to new. There are relationship classes between the three services that are built on Global IDs and GUIDs. So the process needs to maintain the Global and GUID IDs
What is the best practice for transferring data in AGOL?
You can always export the service to filegdb. This would preserve GlobalIds, rel, and attachments.
Then you can use the filegdb to publish a new service with a new name.
Using Append API will allow to transfer the data from the filegdb to the new service without creating new service. It will preserve the GlobalId also but it will not create any relationships or attachments. So importing the filegdb to a new service is the best option.
Online Feature Service Dev Lead
Thank you for your reply. One thing I did not clarify was that the new service has schema changes. I have added a new field and changed the field types of others. So the old service schema dose not match the new one. I know I can export the old service to a FGDB, but how would I load the records into the new service?
You still can use append from the filegdb with the old schema to the new service with the new schema.
You can map fields by name in append. For fields with different types, we do map the old type to the new types as long as the two types are compatible. So old field of type short can be mapped to a new field of type int, etc.
Here is what I tried in AGOL.
What this means is that I have lost my relationship between my Bridge hosted service Global ID and the Bridge GUID in my Bridge Inspection hosted service. I need to preserve the Bridge Global ID to have the relationship classes work.
Are there certain settings in the AGOL append tool that needs to be set to maintain Global IDs?
We definitely preserve GlobalId when exporting. So you should see the same GlobalId in the filegdb.
How did you append? from UX. Pl. be sure to use upsert=true to preserve the globalId. upsert is true from the ux when you choose updateExistingData.