Hi there,
I am having issues with exporting large feature layers from ArcGIS Online to a geodatabase (there are ALOT of attachements). When I export from the export data button on ArcGIS Online it gives up and corrupts the geodatabase locally or when I try and export using the ArcGIS API for Python it gets stuck. Does anyone have a better solution of exporting their hosted feature layer data to a local drive so they can re-publish?
Thanks!
Joe
I have had similar issues in the past and used a combination of ArcPy and ArcGIS API for Python. Do you have access to ArcGIS Pro with a Standard/Advanced licence?
The workflow goes like this....
You have now reassembled an attachment laden feature layer as a feature class in a file geodatabase.
If you have the means to do the above I have code lurking around somewhere Ill dig out and share with you.
Hi Clubdebambos
Could you attach the code, i am trying to batch export selected features which contain attachments by dates from AGOL and save them to a local fgdb
Not fully fleshed-out but you can use ArcPy, see my blog here. Checkout the Export Layer to Feature Class with ArcPy section. You would need to have a selection on the data (Select by Attribute or Location) and then Export the Features. By default attachments should go with them, if not you can explicitly set the environment setting to do so.
I always use this workflow when downloading feature layers, the export button has never worked for large file geodatabases for me.
https://support.esri.com/en/technical-article/000014156
I often use arcpy.management.Append with preserve GlobalID's to append to local FGDB and/or SDE data.
Not the fastest, but seems to always finish, and the attachments come along with it.
Normally, I am appending to the same FC that I used to create the empty hosted layer, so all the fields, attachment table, etc. match.
R_
I have often used this solution too but found on many occasions it timed out and only a subset appended. I found running this tool in chunks of a couple of thousand records each with around 5 1MB attachments worked great without any timeouts
Thanks, guess I haven't hit the limit yet, but will keep this in mind if/when I do.
R_