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...
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).
Were you referring to something else when you meant hosted and update?
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).