Skip to main content
Question

Writing ArcGIS Geodatabase attachments - origin row error


lrs
Contributor
Forum|alt.badge.img+2

I am working with a script that transfers data from one SDE to another SDE. Currently, the script does not ensure that the relationship between a feature and its attachment remains intact. To address this, I extended the workspace based on the guidelines in this article: Writing ArcGIS Geodatabase Attachments.

This solution worked fine when transferring data from one GDB to another GDB using the same data model. However, when we run the script from one SDE to another SDE with the same data model and data, it fails and I encounter the following error messages:
 

Failed to retrieve origin row for a relationship feature with OBJECTID '3' from table/feature class 'BAGGERWERK_WATERLOPEN' GeodatabaseRelationshipFeaturesPipeline::GeodatabaseRelationshipFeatures (SortFactory): A fatal error has occurred.
 

Could you provide guidance on how to resolve this issue?

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • May 22, 2024

It might be easier to wrap some ArcPy in a PythonCaller and make use of the Copy Features tool

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/copy-features.htm


lrs
Contributor
Forum|alt.badge.img+2
  • Author
  • May 23, 2024

Thanks for your response. I have used this method before for other cases. But in this case, it would require modifying the script to which this is added as an extension. This is not my preference, as the script is fairly complicated.


allasimon
Participant
Forum|alt.badge.img+2
  • Participant
  • November 18, 2024

I have been reading a lot regarding these messages after having issues myself writing feature attachments through to the relationship class. In my case, as pointed out by a wise colleague, I was not writing the has_relationship = ‘yes’ and geod_Id features to the feature class. This is needed to inform of the relationship before the information is then written to through the relationship class.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings