Skip to main content

Hi, I'm struggling with processing Geodatabase Attachments. My workflow takes polygon features with attachments, test for an attribute and then converts them to points. Pretty simple. However, keeping the attachments isn't working. I know there are other help examples using attachments but I'm not able to get this to work. My workflow and sample data is attached. If someone could please take a look and let me know what I'm missing?

@dos_gis You are very close, but as is often the case when working with Geodatabases, the devil is in the details. Thanks for including both your workspace and a small sample dataset.

The main reason this will not work is that you have multiple File Geodatabase writers in your workspace:

This is usually a bad sign at the best of times, but when writing relationships the origin, destination and the relationship must all be written using the same writer. You can open the properties of each writer feature type and use the Writer: parameter to point all the feature types to the same writer and then remove the two redundant ones.

When working with Geodatabase relationships, there are very specific attributes that need to be set to ensure the relationships are created correctly. These are summarized in the article: Introduction to Working with Geodatabase Relationship Classes. In your workspace you are reading an existing relationship class and writing to a new one so all you need to do is ensure you rename the appropriate attributes to maintain the relationship. These are:

OBJECTID -> geodb_oid

Then some other details:

  • File Geodatabase feature classes must be uncompressed. I'm not sure why, but the target feature classes must be uncompressed and in your geodatabase they are compressed. In ArcCatalog you can use Manage to uncompress the feature classes.
  • Transaction Type: Edit Session - when writing relationships the transactions must open an Edit Session and that is set on the writer parameters
  • The relationship feature class must have the Table Handling: USE_EXISTING

I've attached the revised workspace and the uncompressed File Geodatabase (FME 2018.1): development-showcase-dp-points V01.fmwt


Thanks a ton, Mark! I'll give it a try.


Reply