Skip to main content
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

 

 

 

 

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. 
Thanks for the response.  I wasn't setting the geodb_type attribute correctly.
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

 

 
@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

Reply