Add rows to ArcGIS Online File Geodatabase from python

233
1
11-10-2021 04:32 AM
HeikoUdluft
New Contributor

Hi,

I am trying to add content to ArcGIS online from python. We have water measurement data for hundreds of locations. The data changes continuously. I want to build a data pipeline that ingests (upserts) data to ArcGIS online.

Following the advice from ESRI support, we split our data into 2 parts:
A) The locations -> an ArcGIS Online Points Layer
B) The measurements -> ArcGIS Online File Geodatabase

I would like to update the File Geodatabase (B) from python. Specifically, I want to:
1) Delete data from the File Geodatabase that is older than 1 month
2) Add new 'rows' of data that was recently collected

I have successfully created table with measurements (by uploading a CSV), Featurelayer (by uploading features using python) and relationship between the two. Now, I would like to update these elements form python (or any other language as long as I can make this work programmatically as part of our data pipeline).

Any help/thoughts/approaches would be great!

 

Heiko

0 Kudos
1 Reply
DonMorrison1
Occasional Contributor III

Hi Heiko.  From python you can access the record data using cursors.  The "input table" will be URL of the ArcGIS online item (in your case the hosted feature layer created from the uploaded file geodatabase).