How do you publish features in a GDB to AGOL/Portal using ArcGIS API for Python?

04-10-2018 07:42 AM
New Contributor III

Is this possible? I know you have to convert it to JSON and the publish it. Is there any examples/guide out there? 

0 Kudos
2 Replies
by Anonymous User
Not applicable

If you want to publish the whole file geodatabase, just zip it up and publish as shown here: Publishing SDs shapefiles and CSVs | ArcGIS for Developers 

If you want to publish just a subset, then you can read it into a SpatialDataFrame (arcgis.features module — arcgis 1.4.0 documentation) filter and keep just those features you want, then publish that as a feature layer. Check out the first few lines in this example: arcgis-python-api/LISAMap.ipynb at master · Esri/arcgis-python-api · GitHub 

New Contributor III

Hi there. 

I am trying to follow the guide from the link above and am having trouble publishing a file geodatabase that is already hosted. Any help would be greatly appreciated

0 Kudos