What's the best method for updating ArcGIS Online data that has sync enabled? Currently, we have multiple offices actively using this data offline.
From memory — this would work unless it has been taken offline — you can't disable sync if the dataset is offline on a device. Once a dataset is taken offline, a replica is created in the background. Think I read that someone made a process to delete the replicas — which sounds painful to me.
Additional question about updating a large Sync enabled dataset.
In my case the data are used as a view-only reference in offline maps, would simply disabled Sync on the service, running a truncate and append, then reenabled Sync be a workable solution or would it case downstream issues?
@Peter_Klingman Do you have an update on the blog posts you mentioned?
I'd probably look at an alternative route as our MMPK's or VTPK's would be rather large for our service areas. It's just not feasible for them to be updated regularly by users.
Something to consider:https://community.esri.com/t5/arcgis-data-interoperability-blog/building-a-data-driven-organization-part-4/ba-p/1086265https://community.esri.com/t5/arcgis-data-interoperability-blog/building-a-data-driven-organization-part-2-go/ba-p/1081060At least one of the methods involves uploading a FGDB to ArcGIS Online and then appending from there to the hosted feature layer. This is far more performant as it's being done within the ArcGIS Online hosted data centre(s). The inbuilt Esri tools really don't seem to cope with large dataset changes.
@NickShannon2, have you tested your package idea yet? I am dealing with a similar scenario and looking for options that will work for my organization. I'm interested to know how this idea worked out for you in practice.
Just revisiting this. As mentioned by @Mondi_GIS & @HeatherWidlund — the 'delete rows' Python API tool struggles with large datasets. @HenryLindemann provided a great script to help with this: Re: Delete features and error 504 and timed out - Esri Community (even this script stopped a few times — my dataset has over 2 million records!).
But, even if you get the script to work consistantly, there's another problem: data replicas. My FHS grew to over 14GB due to replicas. You can delete the replicas , but this is a problem if users have taken the dataset offline in FieldMaps etc.
So, I've gone back to the drawing board — I think the way to go is to provide users with an MMPK or a VTPK package of the data. Host the package in ArcGIS Online, and update as necessary. The package can be linked to a map, so it gets downloaded in FieldMaps — easy for the user. Certainly much easier than updating a large sync enabled dataset.
Prepare maps for download—ArcGIS Field Maps | Documentation
I'll test this out and and will report back.
I am struggling with this, too. I have an open support case with no resolution after weeks and weeks (includes the non-updating of Field Maps data when the data is updated using this method). I started doing the delete and append in Notebook on AGOL to try to avoid connection errors, but it still fails sometimes. I was hoping to automate it with Notebook when that functionality comes online next week but if it's still going to fail half the time that won't work either.
We are still struggling with this. The delete and Append route crashes multiple times and we have to keep rerunning the processes until they have delete and appended all the data. It becomes an extremely manual process and hugely time consuming.
Hi @PhilLarkin they're still in the works, sorry for the delay. We do hope to release them as soon as we can.
@Anonymous User Do you have an update on the blog posts you mentioned?
I have a roads dataset with 90000+ features and a polygon dataset with 20000 features - is delete and append still the only/best way to update this when Sync is enabled and users have it in use in collector?
Hi Peter Klingman,From our enterprise gdb, we've published a hosted feature layer on AGO, with sync enabled. The purpose of the AGO layer is 1) for use in a variety of web maps and applications and 2) to take offline as a reference layer in Collector or Field Maps.
The feature class in our enterprise gdb contains about 700 features, and undergoes a small number of edits on a weekly basis including adding features, editing attributes or occasionally deleting a feature. I need to be able to update the AGO layer to reflect changes. I cannot use overwrite because sync is enabled (and users have a few offline areas downloaded to their devices).
I'd like to have a script push the on premise edit to the AGO FL, and schedule it to run nightly. The workflow I'm describing seem similar to Nick Shannon's use case. For my scenario, is it your recommendation that we use Py API to identify the set of features that have been edited via add, update or delete and then use Apply Edits to push the edits to AGO? Would you have an example script to share?
Or is there a better way? We have several key datasets for which I'll need to implement a best practice solution. Thanks.
Hi Nick Shannon and Jordan Miller,
As far as the best path forward, I think you have two options.
These depend on the end goal of the data changes. Both of these operations can be scripted.
With a sync-enabled layer, as you mentioned you can add features via append. Updating features through append is not possible with sync enabled layers. Append would be the best option if you want to add thousands of features to the service. Deleting rows and appending to the hosted feature layer works as well. Append documentation: https://doc.arcgis.com/en/arcgis-online/manage-data/manage-hosted-feature-layers.htm#APPEND
If the data updates are smaller and contain adds, updates and deletes, using a scripted applyEdits request is the best option. I did some quick testing to confirm, and all three operations are allowed with offline replicas present. My offline replicas with edits synced without issue too. Here is our developer documentation on this: https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-.htm
I hope this helps,
-Peter
Yes, update a Hosted Feature Layer with sync enabled.
It is not possible to overwrite a Feature Hosted Layer with sync enabled:
https://community.esri.com/message/845787-re-cannot-overwrite-hfs-with-views?commentID=845787#comment-845787
I've investigated this script - but can't get it to work for me.
https://community.esri.com/docs/DOC-11621-update-hosted-feature-service-with-feature-class
Scenario: Maps made for Collector usually have reference layers, such as, road network. These layers need to go offline (sync enabled) and need to updated on occasions.
From what I've read, the only way to update layers with sync enabled is to append.
I'm currently looking at using the geoprocessing functions: delete rows & append to update these layer.
But, as Jordan Miller asks, it would be good to know what is Esri's recommended method.
Hi Jordan Miller,
With sync-enabled Hosted Feature Layers in ArcGIS Online, editors can sync offline edits at any time. Ideally this would be with a strong WiFi connection.
Do you mean update the Hosted Feature Layer as in append new features or overwrite from a desktop client?
Thanks,
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.