Question

Blob to Geodatabase

  • 9 August 2017
  • 7 replies
  • 22 views

Badge +8

I have FME reading attachments from AGOL and writing them to a FGDB or SDE GDB. The problem that I'm having now is that FME isn't writing the blobs to the file geodatabase in a way that esri can handle them.

The first screenshot is a directly downloaded database from AGOL. The second screenshot is from the database that I reloaded data with FME. The first screenshot allows you to view attachments, while the second screenshot doesn't allow me to view attachments.

Thoughts @Mark2AtSafe?


7 replies

Badge

I believe your best bet is to use ArcGIS Rest Service to get the attachments. The problem is the related table for hosted feature service is not exposed through rest end point. You can see the related table when you download the hosted feature service to File Geodatabase.

Badge +6

Hello @runneals,

 

Are you able to clarify your workflow for me, I think if I am understanding correctly.

 

You are reading in a feature from AGOL that contains attachments, you then want to write this to a Geodatabase(File or SDE) and maintain the attachments with the features. Is that correct?
Badge +8

Hello @runneals,

 

Are you able to clarify your workflow for me, I think if I am understanding correctly.

 

You are reading in a feature from AGOL that contains attachments, you then want to write this to a Geodatabase(File or SDE) and maintain the attachments with the features. Is that correct?
Correct. Here's my workflow.

 

I had to delete and recreate the relationship class in the fgdb and recreated it to join the ORIGINAL_GUID and ORIGINAL_RELGUID (both which come from the original AGOL item).

 

Badge +8

I believe your best bet is to use ArcGIS Rest Service to get the attachments. The problem is the related table for hosted feature service is not exposed through rest end point. You can see the related table when you download the hosted feature service to File Geodatabase.

I can see the related table just fine.
Badge +6

Hello @runneals

Apologies for the delay in getting back to you.

In order to get the blobs into an ArcSDE or File Geodatabase, you would have to create another table for the blobs and set up a relationship between the original and attachment table. If you would prefer a simpler/easier way of being able to carry out this translation of maintaining the relationship between the features please let me know.

Badge +8

Hello @runneals

Apologies for the delay in getting back to you.

In order to get the blobs into an ArcSDE or File Geodatabase, you would have to create another table for the blobs and set up a relationship between the original and attachment table. If you would prefer a simpler/easier way of being able to carry out this translation of maintaining the relationship between the features please let me know.

@trentatsafe I talked with one of the guys on our GIS team and he mentioned that you guys didn't seem to account for writing to esri geodatabases where they auto assign guids when using attachment relationships (overwriting the guids coming from AGOL). Can you guys throw together a workflow that works accounting for this? I've attached mine that doesn't work as a sample. It would also be nice to have more detailed documentation on this.

 

Thanks!

 

agol-attachments-testing-to-fgdb.fmw
Badge +3

I posted this answer also here: IDEA: Simplify AGOL to Geodatabase with attachments

***

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!

Reply