Overwrite Or Append a web feature layer Arcpy, ArcGIS Pro

3715
12
04-05-2020 07:36 AM
HushamMohamed
Occasional Contributor

I have a dynamic query layer (polygon) derived from feature class and SQL table, I was able to share it to ArcGIS Online as a web layer.

1-  I would like to setup an automated workflow for overwriting or append to hosted feature services within our ArcGIS Online Account (stand alone arcpy script) and schedule that for everyday update. I tried this one Update Hosted Feature Service with Feature Class but got this error. I am not interested using Python API, 

 

2- Where is the path of Query Layer (workspacePath) ?  I know its generated and already shared to ArcGIS Online.

3- also I went through this one Best Practise for scripting updating of hosted feature services?

  but none of  them helped. 

0 Kudos
12 Replies
by Anonymous User
Not applicable

I've been exploring the use of the python api and overwrite (FeatureLayerCollection and manager) to update a hosted table. The overwrite works through Windows Task Scheduler running a DOS batch file that calls a python program.  The ultimate goal is to update a table that is joined to a feature class.  However, when I have the table joined to the feature class, the overwrite of the table fails apparently because the table is "locked" up.  I have changed the settings to allow edits to the table and the original feature class but to no effect.  The join is one (feature class) to many (table).  Anyone experience something similar.   I will explore Append to the table for the updates.  Append is just a little more complicated.  Thanks

0 Kudos
JakeSkinner
Esri Esteemed Contributor
DominguezWilliam
New Contributor

Not sure if this is still an issue but I was able to get this to work from a esri presentation youtube link below. One issue was all date column have their time zone affected. I add batch calculate field to add 1 day to all date columns. This fixes my issue and allows the model to publish as scheduled. 

0 Kudos