Select to view content in your preferred language

Automate upload of files to ArcGIS Online from an ftp site using Notebook

179
2
Jump to solution
3 weeks ago
Labels (2)
DrewDowling
Frequent Contributor

We have a notebook in ArcGIS online that runs some geoprocessing tools on a .csv file and publishes the results to a hosted feature layer.

The .csv file is currently manually uploaded each week. Is there any way to automate this upload? The problem is that we don't have a local server to act as an intermediate host of the file. We need to add the .csv to our AGOL content directly from Notebook.

 

 

0 Kudos
1 Solution

Accepted Solutions
CodyPatterson
Frequent Contributor

Hey @DrewDowling 

Since Notebook on AGOL is cut off from most abilities to locally access the file system, you would need to create a separate script that is hosted on a local machine to upload the CSV to AGOL and update it, but since you don't have that, it would be tricky. You can use the same ID and update the CSV with the new information each upload, but this would require you to take the username and password for the GIS('login') off of the notebook, which normally requires a built-in account. Here's a link that goes into how to do that: https://developers.arcgis.com/python/guide/import-data/

Best bet would be to find a way to locally store the file and have it upload from there, otherwise, the options spread pretty thin.

Cody

View solution in original post

2 Replies
CodyPatterson
Frequent Contributor

Hey @DrewDowling 

Since Notebook on AGOL is cut off from most abilities to locally access the file system, you would need to create a separate script that is hosted on a local machine to upload the CSV to AGOL and update it, but since you don't have that, it would be tricky. You can use the same ID and update the CSV with the new information each upload, but this would require you to take the username and password for the GIS('login') off of the notebook, which normally requires a built-in account. Here's a link that goes into how to do that: https://developers.arcgis.com/python/guide/import-data/

Best bet would be to find a way to locally store the file and have it upload from there, otherwise, the options spread pretty thin.

Cody

DrewDowling
Frequent Contributor

Thank you @CodyPatterson 

0 Kudos