AnsweredAssumed Answered

Using a AGOL HFS in Python directly?

Question asked by dougbrowning on Apr 17, 2018
Latest reply on Apr 20, 2018 by dougbrowning

In the past I have had some luck giving a AGOL HFS directly to a built in geoprocessing tool or script.  I usually created a layer file and fed that in.  BUT layer files refuse to save the tables - and most of what I want to use in tables.  In fact tables are always hard to get in ArcMap.  Try it - (Add a HFS with tables to ArcMap - save as layer file - open layer file - no tables! Or go to Add Data button - AGOL HFS - no tables! Or File - ArcOnline - Add - no tables!  Finally in Catalog go down to My Hosted Services - add the HFS - and actual tables!  But then save this out as a lyr file and tables are gone.).


What I would like to do is change my input source in Python from this

sourceDB = r"\\adgroup\blah\blah\data.gdb"

to something like

sourceDB = "direct link to HFS in AGOL"


Most of the script is Search Cursors so it would need to work with that.  This may be over hoping.


Any ideas on this? 


Backup plan is to use the python api to export/download a GDB (I already have this code) then unzip and feed to script.  But it would be nice to just go direct.


Another option may be ArcPro using v3?


Thanks for any ideas.