Question

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


11 replies

Userlevel 3
Badge +13

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.

 

imageAm I missing something obvious here? Really appreciate your help with this.

Thanks

Brett

Badge +4

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

Userlevel 3
Badge +13

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.

Badge +4

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

Userlevel 3
Badge +13

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.

Userlevel 3
Badge +13

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:

Badge +4

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

Userlevel 3
Badge +13

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.

Badge +4

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 the reply @kailinatsafe​ ..

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..

 

Image is already attached

Thank You

Badge +4

@kailinatsafe 

 

Hi Mayam

 

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

 

Reply