Select to view content in your preferred language

Script tool to overwrite/publish web feature layers

526
2
02-01-2022 04:50 AM
JamesShreeve
Occasional Contributor

Hi there, 

I'm hoping for a bit of help please. I'm attempting to automate some workflows that involve updating layers held on my organisations ArcGIS online portal from files held on our local network. I've been pointed towards this very helpful blog - Publish and overwrite web layers in ModelBuilder (esri.com) - which would allow me to schedule the script tool to run as and when I'd like...perfect! The only problem I'm having is that the input is 'map', ideally I'm looking to have the input as a layer file (ideally from a network location) so I am not reliant on there being a separate map set up for each update I need to automate. I'm a relative novice with Python so am struggling to work out how to change the script on the linked blog to use a different input. Any help would be massively appreciated!! (i've attached the txt file of the Python script on the blog)

Many thanks in advance,

James

0 Kudos
2 Replies
haleyh_amarillo
New Contributor

Hi, James. I've recently been on the journey to find out a solution to this problem as well and I've scoured the internet and community posts to try to find a solution. I don't see any responses on your original post, but wanted to see if you found a workable solution that you could share.

 

0 Kudos
JamesShreeve
Occasional Contributor

Hi, after a while I managed to find an alternative message which didn't involve have much more Python knowledge than I currently have. I used ModelBuilder to create a tool which truncates and re-populates the web feature layer, once I had the model created I then scheduled it using the function within ArcGIS Pro. I've had this running quite a few months now with no issues. The only caveat I would say is that the data I'm dealing with allows me to just truncate and append. I've added a screenshot below of how my tool is set-up, this tool converts a database table into points and then truncates the web feature layer then appends the created points to the WFL. Hopefully this is of some help to you and please feel free to ask any questions. Thanks!

JamesShreeve_0-1671707151072.png

0 Kudos