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

1617
2
04-10-2018 07:42 AM
GajananBalasubramaniam1
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
AtmaMani
Esri Contributor

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 

RoryBennison
New Contributor II

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