Skip to main content

 

Hi Folks,

 

I’m trying to download images from Google Drive and convert these images to point and add the photos as attachment to the extracted points.

I’ve created the relationship class in ArcCatalog and I could have the points and the attachment table when I disabled the Relationship writer. But when I enable it I got the following error “ERROR |Failed to retrieve origin row for a relationship feature with OBJECTID '226' from table/feature class 'ARSiteVision_Images'”

I’m not sure what I missed here, I followed the instruction in this link but with no luck.

 

I attached the FME Workbench if this is could be helpful.

 

Ps: I have only 224 images so I would have 224 points so I’m not sure from where 226 come!

 

Thanks,

Rawan

@rawansaleh The article Writing Geodatabase Relationship Classes is a little clearer. There is also an article specifically on attachments: Writing ArcGIS Geodatabase Attachments (although this deals with 1:M attachments so it's a little more complex)

In summary, you need to have the following attributes set on the different feature classes:

Origin:

  • geodb_oid (this will be the same value as geodb_rel_origin_oid)
  • geodb_feature_has_relationships = yes

Destination (_ATTACH)

  • geodb_oid (this will be the same value as geodb_rel_destination_oid)
  • geodb_feature_has_relationships = yes

Relationship (_ATTACHREL)

  • geodb_rel_origin_oid (same as geodb_oid on origin)
  • geodb_rel_destination_oid
  • geodb_type = geodb_relationship or geodb_attributed_relationship

I think you might be renaming geodb_oid to geodb_rel_origin_oid before the 'origin' feature class. Use feature caching - you can then look at each feature before they enter the writer to ensure they have the correct attributes.


There is another pattern available - using a shutdown script:

https://community.esri.com/community/open-platform-standards-and-interoperability/blog/2019/03/21/using-arcgis-pros-python-environment-in-etl-tools

 


Reply