Skip to main content

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?

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


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.


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