Update Hosted Feature Layer Data from ArcGIS Pro Sync Enabled

717
4
09-15-2023 09:16 AM
ModernElectric
Occasional Contributor III

Good Morning:

Background: I have a series of Hosted Feature Layers that are published to AGOL that originated from a File GDB in ArcGIS Pro. These Hosted Feature Layers are Editing Enabled and SYNC Enabled due to the fact the layers are used in Field Maps and Workforce. 

Issues/Problems: It is a known fact that if the hosted feature layer is Sync Enabled, it cannot be updated via ArcGIS Pro (Overwrite Web Layer). In order to do this, the the Sync Enabled needs to be disabled in the settings of the Hosted Feature Layer. However, when doing this, the data from ArcGIS Pro is NOT updated. The process is more like truncating the dataset on AGOL. Only way is to fully delete the Hosted Feature Layer and Recreate the Web Layer from ArcGIS Pro and redo ALL of the web maps and workforce projects. 

Trying to use the Truncate tool in ArcGIS Pro on a hosted feature layer is a NO go. Other option is to use the Append tool from ArcGIS Pro which just ads duplicate records and then need to go into the Hosted Feature Layer to remove.

All of these issues/problems are inefficient.

Request: Need to know what the best efficient workflow/process for updating data from a File GDB Feature Layer in ArcGIS Pro TO a Hosted Feature Layer that has sync enabled in ArcGIS Online without interrupting the user's that are using the data in Field Maps and Workforce. ArcGIS Pro Data Model; Python script; etc.

Appreciate your help because I have deleted my data on AGOL, recreated and rebuilt the maps too many times now.  

0 Kudos
4 Replies
CarlMorrison
Occasional Contributor

This solution, may not fit your needs, but I have found for minor updates and edits to a hosted feature layer, I load the hosted feature layer into ArcGIS Pro and edit the online version in Pro.

0 Kudos
ModernElectric
Occasional Contributor III

The goal is to set a script/batch file to update the whole database. Issue with that is after having to update the working dataset (new development), I would have to update the AGOL dataset as well. Seems to be inefficient to 2 it twice. Plus, the attributes for billing and services information changes alot. 

I did find a script (Truncate/Append) that allows me to update the whole Hosted Feature Layer even when it has sync enabled. The problem is I have to upload each individual feature class to AGOL as a unique Hosted Feature Layer to utilize the script. Would have have (1) script for the whole Hosted Feature Layer (Composed of a few dozen Feature Classes and tables and relationships classes).

0 Kudos
CarlMorrison
Occasional Contributor

I use a Truncate/Append script that pulls data from a SQL SSMS query and it works well, but it is not a layer that is edited remotely, and your right you would need individual feature classes.

0 Kudos
ModernElectric
Occasional Contributor III

I've been testing this with some of my feature class(s). Yes, in order for the Truncate/Append Python script to work - it has to be from a single GDB Feature Class to a single AGOL Feature Layer. 

This seems to be very very inefficient. Instead of having one Hosted Feature Layer with dozens of layers/tables/relationships, I will need to upload each individual feature class to a unique Feature Layer and build a script to update each individual feature layer. 

0 Kudos