Skip to main content
Question

Writing relationships in ESRI file geodatabase

  • May 22, 2013
  • 4 replies
  • 177 views

All,

 

 

I am using the ESRI file geodatabase writer to write data to both a feature class and table class and establish a foreign key relationship between the data in the two classes.  The only relationship documentation I've found is under the ESRI geodatabase (Access database) writer and that is what I have been trying.

 

 

I have three FME feature types for my writer;  one for the feature class, one for the table class, and one for the relationship.  I am setting a geodb_oid on the data for the feature class and table class.  I am setting the set the geodb_type to geodb_relationship, and I've also tried geodb_attributed_relationship, on the relationship FME feature type.  The geodb_feature_has_relationship is set to Yes for all three FME feature types and the geodb_rel_origin_oid and geodb_rel_destination_oid are being set for just the relationship feature type.

 

 

When I run the workspace, I'm receiving the error:

 

 

Attempting to write a non-relationship feature to relationship class 'Main_Liner'. Ensure the 'geodb_type' is set to a valid relationship class type

 

 

 

Am I doing something wrong or is the ESRI file geodatabase writer not able to write the relationship information?

 

 

Thanks,

 

Steve

 

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • May 22, 2013
Hi,

 

This should be possible as this demo shows.

 

I would test the geodb_type attribute to make sure the correct values exist.

 

Hope this helps. 

  • Author
  • May 22, 2013
Thanks for the response.  I wasn't setting the geodb_type attribute correctly.

andystreet
Participant
Forum|alt.badge.img+1
  • Participant
  • March 26, 2015
I'm, getting the same response writing a relationship to a GEODATABASE_MDB relationship class. I have checked the relationhsip feature and it has the attributes I believe are needed. i.e. 

 

geodb_rel_destination_oid (64 bit integer)    2

 

geodb_rel_origin_oid (64 bit integer)    1

 

geodb_type (string)    geodb_relationship

 

 

In your initial question it looks like you were setting the geodb_type attribute correctly initially, but then you indicate in the resolution that some other geodb_type setting was needed.

 

Do you recall what the change to geodb_type then allowed the relationship to be created?

 

I've checked the demo and the answer didnt jump out at me.

 

Thanks andy

 

 

blueinc
Contributor
Forum|alt.badge.img+6
  • Contributor
  • July 13, 2015
@AndyStreet: In addition to the 3 attributes you mention, I also had to set geodb_feature_has_relationships = YES (using an AttributeCreator) and set the Allowed Geometries on the Writer feature class = geodb_relationship