Simplify AGOL to Geodatabase with attachments

Related products: FME Form

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.

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.



How ironic Annabelle, this was my ticket/idea and our user that requested this just wrote to me asking about the status... Great minds think alike!

 

 

We are not looking to write attachments to AGOL, we are focusing on downloading attachments and putting them in a related table to a feature class in a File Geodatabase or SDE Geodatabase. The biggest problem that we are currently experiencing is that the relationship & unique keys are broken when downloading and pushing it into a FGDB, since it has it's own unique keys already built in, which makes it hard/impossible to rebuild the relationship properly. Hopefully that makes sense? Let me know if it doesn't and I can try to clarify better!

 


Attachment read/download was added in 2017.1. Did it satisfy your use cases?
The download works perfect... However the other part of this ETL equation is being able to write that data back out to a FGDB or SDE db and be able to retain the relationship between the attachment and it's parent item. It might be on the reader, but it also might be on the writer, so possibly a sample template might be in order 🙂 (Previously submitted as C131289, so take a look at that for example of my specific use case).

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.