Publish HOSTED Feature Layer with Python

3612
3
09-01-2017 11:01 AM
by Anonymous User
Not applicable

Greetings. 

I am able to create/publish a zipped geodatabase to AGOL with python using the .publish() method.  However, this does not publish as a HOSTED Layer.  I really need it hosted so that it can be downloaded as a geodatabase.

It there a way to publish as a hosted layer using python?

Or, it would be just as good or better to be able to use the .update() method to update the data source.  'data' does not seem to be one of the types available to that method though...

Thanks

3 Replies
by Anonymous User
Not applicable

When you publish a web layer on ArcGIS Online (AGOL) using the Item.publish() method, it is always a hosted layer. My guess is you are publishing a hosted feature layer, hence, you can export it layer as a file (geodatabase or shape file).

By update, if you want to update the features in the layer, then you can do so either by editing features individually or through the overwrite workflow.

Were you referring to something else when you meant hosted and update?

by Anonymous User
Not applicable

That’s what I mean, but when I use item.publish() for a zipped geodatabase, it shows up in the content as just a Feature Layer. Not a Feature Layer (hosted). And the settings tab does not have the option to “Allow others to export to different formats”. So it is not downloadable as a FGDB.

Using item.update() does not throw an error, but does not overwrite the existing dataset with the new. I will look at your link and try the overwrite() method and report back (though I’m pretty sure I tested this with the same results).

Thanks

0 Kudos
PhilLarkin1
Occasional Contributor III

Hi Doug

I experienced the same problem when using item.update() for an Excel item.

https://community.esri.com/message/713792-itemupdate-function-returns-false-positive-status 

0 Kudos