Solved

Read ArcGIS Online Attachments using Feature Reader

  • 28 January 2019
  • 10 replies
  • 105 views

Is there anyway to read in attachments while using the FeatureReader transformer. I know there is an option with the ArcGIS Online Reader but I don't know my Where Clause until after certain point in my workflow. Feature Reader was working perfect until I realized I couldn't read in attachments. Any help would be great!

icon

Best answer by lauraatsafe 29 January 2019, 00:05

View original

10 replies

Badge +9

Hi @iaguilera14

Unfortunately, you've run into a shortcoming in the FeatureReader itself with this. The FeatureReader currently does not expose any parameters that would be set on the individual feature types for readers. So there is no way to tell the the ArcGIS Online reader to read the attachments when using it inside the FeatureReader. We do have an enhancement request internally to add support for changing feature type parameters inside the FeatureReader, so I've linked this post to that request. We'll update this as soon as that has been done.

For your workflow, one potential workaround might be to make use of the WorkspaceRunner. For that, you'd need to make a second workspace with the AGOL Reader in it and publish the Where clause. Then use the WorkspaceRunner in your first workspace to send the Where clause into the second workspace.

Unfortunately this is part of a data stream work space in FME Server. So I am not sure using the work space runner will work in my case, and for my steam to work I would need to remain within the same work space I believe. I will explore using Esri's Rest API to grab the attachments.

Badge +1

Hi @iaguilera14

Unfortunately, you've run into a shortcoming in the FeatureReader itself with this. The FeatureReader currently does not expose any parameters that would be set on the individual feature types for readers. So there is no way to tell the the ArcGIS Online reader to read the attachments when using it inside the FeatureReader. We do have an enhancement request internally to add support for changing feature type parameters inside the FeatureReader, so I've linked this post to that request. We'll update this as soon as that has been done.

For your workflow, one potential workaround might be to make use of the WorkspaceRunner. For that, you'd need to make a second workspace with the AGOL Reader in it and publish the Where clause. Then use the WorkspaceRunner in your first workspace to send the Where clause into the second workspace.

Hey Laura,

 

Has there been any update in regard to this request?

Userlevel 2
Badge +10

Hey Laura,

 

Has there been any update in regard to this request?

Hi @vhruska13​ unfortunately the request has not been added to FME yet and is still in development. May I ask how this is affecting your workflow?

Badge +1

Hey Laura,

 

Has there been any update in regard to this request?

Hey Dan,

 

I'm pulling attachments (and data) from AGOL in order to generate XML's - often over 1000 at a time. I have found that If I try to pull more than ~300 attachments at a once, I get server errors from AGOL or it just takes forever.

 

I have been grouping features 300 at a time, and passing them through a range filter, then using an aggregator to create a where clause for an AGOL attachment reader - just for attachment data. I have to manually select a new range after each batch has finished running in order to generate the entire run of XML's.

 

I would like to be able to dynamically set the FeatureReader's AGOL Where Clause and have it include attachments to get around this.

 

I realize that I can probably use a workspace runner to carry out the batch operation, but I also have a ton of data that makes up the rest of the XML that would need to be brought into these subsequent workbenches. Short of creating parameters for 100's of fields... I'm unsure of a good solution to solve this challenge.

 

Do you have any suggestions?

Badge +1

Hey Laura,

 

Has there been any update in regard to this request?

Will be good to know when this is ability is added to the featurereader.

 

I'm using an automation webhook/sqs with Survey123 and reading the feature details to extract the feature with its attachments.

 

I'm thinking using another workbench and a AGOL Feature Service Reader with a where statement on the objectid triggered by the first workbench will do the job??

Badge +8

Is there any update on this point?

Userlevel 3
Badge +13

Hello @koenterralytics, thanks for inquiring! Unfortunately, it doesn’t look like there are any updates on this! Are you able to use the AGOL readers/writers to handle attachments in the meantime? Truly sorry if this causes any inconvenience, Kailin. 

Badge +8

@kailinatsafe , actually the AGOL reader is no workaround for my current process. Instead of loading just a few objects, I have to get thousands of objects with attachments. Because of that the workspace takes about 5-10 minutes every day, instead of just a few seconds. And because I use FME-server/flow with a pay-per-minute structure, this adds up! 

Badge +8

Actually, I just realized that a work-around with a FMEFlowJobSubmitter will work here. So first I've got a simple workspace to check which objects need to be retrieved from AGOL. After that the FMEFlowJobSubmitter with a parameter starts the second job where the right objects are loaded including attachments. 

Reply