Skip to main content

Hi All,

I’m trying to write an existing ESRI GDB relationship 1:1. I have watched a few of the FME articles material here https://support.safe.com/hc/en-us/articles/25407490028813-Writing-Geodatabase-Relationship-Classes  but can’t get it to work. Here is the scenario:

  • I have created the relationship (1:1) manually in ArcPro as the relations can’t be created using FME.
  • The relation is one to one and needs to be done by Title_Number field.
  • I have also created the relevant fields after reading the article above, here is an screenshot of the AttributeCreator:

 

  •  Here is an screenshot of the relationship in ArcGIS:
  • Also here is an screenshot of the FeatureWriter settings to write the relation in the template GDB:
  • And finally the error in FME after trying to write the relation: Attempting to write a non-relationship feature to relationship class 'rel_NPS_CCOD'. Ensure the 'geodb_type' is set to a valid relationship class type

 

Any idea how to make it to work?

Thanks

Hi All, 

I have been playing around with the workflow and was able to simplify the workbench to isolate the issue. I complete the exercises in the following article https://support.safe.com/hc/en-us/articles/25407490028813-Writing-Geodatabase-Relationship-Classes which helped me a lot! I was able to create a very simple workflow to create a relation between a Feature class and a table and worked fine 🙂 (….the gdb relation had to be created in ArcPro before running the workbench).

 

Then...I tried to replicate the same with my project data and doesn't work for some reason. I still get the following error at the end of the FeatureWriter. The Feature class and table write ok but the relation fails : ‘Missing required attribute 'geodb_rel_origin_oid' for writing relationship. Please specify this attribute on all relationship features to be written’

 

Why fails with ‘geodb_rel_origin_oid’ attribute while has correctly been set up?

 

Here is an screenshot of the workflow:

 

Attached the workbench and the template GDB that I use for my translation,

PD: I wish I could provide the data but it is too big

Any help more than welcome :)

 


I think you should not write to the relationship class when writing to 1:M, but to the related table, and FME does the writing the the relationship class under the hood. But I rarely do this so I am not very sure. Writing to a relationship class is only needed when writing M:N.


ok thanks @nielsgerrits  for the answer, the relation needed is 1:1 actually,

I have tried to write the relationship to the related table (‘destination table’ you meant?) but the workflow fails again, 

 

  • Polygon dataset: NPD_MonthYear_FullSupply
  • Table: CCOD_Full_Year_Month
  • Relationship class: rel_NPS_CCOD 

How should I do the 1:1 relation between the Polygon and the table in FME?


I think the relation info need to be written to the secondary table.


Thansk @nielsgerrits I have changed it but keeps failing with a different error this time, see below:

I have a attached a new version of the workflow in the case you can have a look, the relation info goes into the secondary table (CCOD_Full_Year_Month) but FME doesn’t like it,


Thanks @nielsgerrits  I have been able to make it work. You were right, there’s no need to write the relation in FME. I basically created the 1:1 relation in ArcGIS and then use the FeatureWriter to populate the Polygon and the related table. Then ArcGIS will do the rest for as the relation is created already.

Hope that’s clear to everyone :)


Great job, happy I could point you in the right direction. Could not help more as my time is limited at the moment.


Reply