Transfer data from existing service to new one in AGOL.

274
5
04-05-2019 12:44 PM
KevinKozak
Occasional Contributor

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?

 

Thank you,

 

Kevin

0 Kudos
5 Replies
KhaledHassen
Esri Contributor

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.

Khaled Hassen

Online Feature Service Dev Lead

0 Kudos
KevinKozak
Occasional Contributor

Hello Khaled,

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?

Thank you,

Kevin

0 Kudos
KhaledHassen
Esri Contributor

Hi Kevin,

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.

Khaled Hassen

0 Kudos
KevinKozak
Occasional Contributor

Hello Khaled,

Here is what I tried in AGOL.

  1. Exported old service data to file GDB.
  2. Downloaded the zipped file GDB to my computer.
  3. Appended the zipped file GDB to new service.
  4. Check Global IDs between same record in both services.
  5. The Global IDs do not match.

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?

Thank you,

Kevin

0 Kudos
KhaledHassen
Esri Contributor

Hi Kevin,

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.

Khaled 

0 Kudos