How do I copy AGOL reocrds with file attachments to a separate AGOL feature service?
I am trying to to transfer records with jpg file attachments between two seperate AGOL hosted feature services. The source has also has point geometry which is stripped out prior to passing into the target table. I've been able to create the target table by using the AGOL feature writer, but I'm unable to access the attachments - even though I've exposed the attachment attributes and ticked the "include attachments" parameter in the feature reader.
Does anyone have a working example of this transformation?
Thanks in advance,
Brett
Page 1 / 1
Hello @tkow_trappers , have you used the AGOlAttachmentAdder or the AttachmentWriter from the FME Hub? The AGOLAttachmentAdder will add an attachment to an ArcGIS Online feature service that has attachments enabled. I think the AttachmentWriter template requires python, so whatever you're more comfortable with! Best, Kailin.
Many thanks Kailin,
I'm a newby to FME, so please bear with me. The AGOL AttachmentAdder seemed like it would work, but the transformer is writing to an SDE featureclass, rather than an AGOL hosted feature service. I just can't seem to write the exposed attachment data and attributes to a secondary hosted feature service by using this transformer.
Here is an image of the test I've been trying to run. I thought it would be a simple process of exposing the attachment attributes and then passing them through to the target feature service, but they won't link - even if manually added.
Am I missing something obvious here? Really appreciate your help with this.
Thanks
Brett
Just curious to know
Can I attach pdf , jpg and an excel to a record and then push it online
it possible to attach 3 files as attachment to a record
Just curious to know
Can I attach pdf , jpg and an excel to a record and then push it online
it possible to attach 3 files as attachment to a record
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
Thank You for Reply.
I have followed same article for the scenario in making relationship and was successful only making relationship with tables only , i cannot go with attachments for PDF, Excel and JPEG.
I have provided the details in the link with Log file and sample data and FME workspace with dummy attachments..
Need your look to over come this..
If I'm successful here then i can update the ArcGIS online
Can I have modified version with Attachments of PDF , EXCEL and JPEG
Each record in relationship table of CEMP and Insitu will have 3 attachments as 1 - PDF,Excel and JPEG..
Again Thanks for considering
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
Hello @abnan0001, thanks for the update. I am attaching 2 workspaces in the attached zip folder, one uses the fmwt you provided, and the other shows an example using the article workspace.
Regarding your workspace, I decided to use the cemp_activity feature class and 3 random attachments to demonstrate the process. Unfortunately, I wasn't able to write the attachments successfully, due to an issue with the xml workspace document (that I wasn't able to decipher). It might be good to double check if the xml workspace document reflects the feature types you're looking to write relationships/attachments to (also note, relationships need to be enabled on a feature class in ArcGIS Pro before FME can write to it properly). Nonetheless, I thought this might help you get started with 1:M attachment writing. Let me know if you have any questions about the workspace. Happy to try and help further!
The second workspace uses the same data as the article, but I have edited it to successfully write 3 attachments to a single feature in a featureclass. I've confirmed all 3 attachments are visible in ArcGIS Pro. Please note, everything I changed is highlighted in a green bookmark. Happy to help, Kailin.
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
@abnan0001, apologies, my upload didn't complete before I posted! workspaces can be found here:
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
Thank You Mayam @kailinatsafe for your Quick Response..
I was wondering with 2nd workspace
3 different attachment to that 1 record like the attachments should be an Image , PDF and an Excel Sheet to a single record and similarly it will go with other records in a feature class layer
Can you please support to overcome this with an example .
I have been trying and I was not successful.
Thank U
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
Hello @abnan0001, thanks for replying. The second example demonstrates how to write 3 attachments to a single feature in a feature class. If you notice the Sampler transformer, this is randomly sampling 3 attachments to write. If you would like an image, pdf, and excel sheet written to a single feature, you will need to join them in the workspace (for example, perhaps the filename of each attachment can be used, similar to the process in the article). All 3 attachments will need to reference the same parent feature. Happy to help, Kailin.
Hello @abnan0001, great question! I think so, yes, as long as the ID's on the attachments and features are set up correctly. You would want to use a similar method to this article, and ensure all the attachments reference the same parent feature (eg. have the same REL_OBJECTID I think). Let me know if you get stuck while trying this! Happy to help, Kailin.
I was trying last days based on your valuable inputs given to me but i was un successful in getting the output with the similar 2nd workspace of article..
Can I request , If i can have a sample workspace you have provided already with an support with PDF , Excel and Image Attachment..
Could you Kind an example, I'm not able to match pdf and excel only jpeg is being considered
I have generated guid but it generated whenever I try to run the workspace ,I want to have static columns once generated to match it with other attachment..
Can You please provide an example
I shall be thankful to you
Hi @kailinatsafe
Still no success with me for PDF and Excel attachments. Can i have a sample workspace with an example to attach PDF and a excel as JPEG was done. I shall be thankfull Thanks
@tkow_trappers I am trying to the exact same thing and just wondering were you able to find a way of coping AGOL records with file attachments to a separate AGOL feature service ?
Hello @abnan0001, perhaps its best at this point we work together in a support case. Are you able to use the online form to create one? I think the key is to assign the PDF + JPEG the same REL_OBJECTID so they relate to the same record, but we can dig ito it together! Sorry for missing your replies.
Also, hello @kt_fish, when you create the new target feature service, do you enable attachments on the feature layer before trying to migrate the attachments? This article demonstrates how to build out the attachment table and relationship.
Hi @kailinatsafe Thanks for getting back to me. Would appreciate working together to be find a solution to our problem/question. It looks like i am able to create a case, have you created one already as I new and not used it before?
In the ArcGIS online feature service which are receiving I have the attachments enable on the layer. I was thinking it would need to use a common value e.g. REL_ObjectID, ( I was trying with a common GUID) to match them up but couldnt figure out how that would be created. I will look into that article relating to “Writing ArcGIS Geodatabase Attachments” as I didnt think of creating a relationship table as it was a ArcGIS online to ArcGIS online transfer. I have seen people use it for when they bring them into ArcGIS Pro.
Hello @kt_fish, yes! Please feel free to submit a case if you still are having issues! Best, Kailin.
Hello @kt_fish, yes! Please feel free to submit a case if you still are having issues! Best, Kailin.
Hi @kailinatsafe the team who got back to me outlined how they would do it so ill look into it. Thanks for all your help.