I am working on a workflow which automates the download of an ArcGIS Online Feature Service and save it as a geodatabase. The service contains attachments which I'm trying to preserve. I can see that as of FME 2017.1 I can now download the attachments from AGOL which is awesome but saving these to a geodatabase becomes problematic. I can see from this article that there is a way to do it but it seems overly complex and still appears to involve a manual step.
Simplify AGOL to Geodatabase with attachments
FME Form
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Hello all followers of this Idea!
We are reaching out to you as part of our recent push to support writing AGOL attachments in FME. We are contacting customers who have indicated they would like this function implemented, to determine what their ideal writing experience would look like based on their user requirements.
If you have a moment to respond, that would be greatly appreciated!
The questions are :
1) What is your use case for writing attachments in AGOL?
2) What functionality would you be looking for in an AGOL writer that supported attachments (e.g. update/insert/delete)?
3) What would be the bare minimum required features you would like to be able to write/upload as an attachment (e.g. images, PDFs etc).
Any insights or information you might be able to provide regarding the above would be wonderful.
I know there is a post somewhere on the knowledge base about this topic. I could not find it that quickly, but I did find this post: Introduction to Working with Introduction to Working with Geodatabase Relationship Classes
I have done this several years ago myself and a few steps need to be taken. First a database needs to be prepared and all the feature classes / tables need to be present before writing, including the relationship class. Next when writing in FME, features have to be written to the parent, the child class and the relationship class. And attention needs to be paid to the writing of the ID's otherwise your relationships / attachments will get messed up!
Business case: We want to copy hosted Survey123 data with attachments to SDE for further analysis
See: https://knowledge.safe.com/questions/89249/writing-portal-for-arcgis-or-agol-image-attachment.html
did you ever get this sorted? I am trying something similar. However I want to get the attachments from a feature class (line) merged with a second feature class (point) based on an asset ID. I'm working with SDE readers and writers
Backup of all hosted feature layers with or without attachments as detailed here using python may also be a good use case to improve this idea.
https://support.esri.com/en-us/knowledge-base/how-to-back-up-hosted-content-by-looping-through-and-do-000022524
IMHO, @bruceharold solution with a python shutdown script is one of the most efficient ways to back up a feature service with attachments.