Skip to main content

Hi folks,

I had a question regarding creating an FME script that takes attributes from a system of record dataset into an existing record created in a feature class within an Enterprise Geodatabase.

Workflow consists of the following:

Two layers with the same information and attributes in different systems of record – one in an asset management system and feature class in an Enterprise Geodatabase.

No integration exists between the two systems yet as there is a new replacement system being developed in a project, but in the intermediary, it has been decided that the business will be updating the asset in the asset management system, then updating the feature class attribute table in the Enterprise Geodatabase. Therefore, they will be maintaining two datasets in tandem until the pilot project for the replacement system is complete.

The difference is that the layer in the asset management system only stores XY/Lat/Long values whereas the true layer in the feature class in the Enterprise Geodatabase consists of a polygon geometry. The system of record asset management system is not able to store any other geometry other than point/xy/lat/long data. That being said, I have ensured that the feature class in the Enterprise Geodatabase has the same fields/attributes as included in the dataset from the system of record so they have identical data schemas/fields.

Therefore, I want to create  a FME script that translates the attributes from the asset stored in the asset management system into the appropriate record in the feature class stored in the ESRI Enterprise Geodatabase when a user creates a polygon by editing the feature class in the Enterprise Geodatabsae.

The workflow will look as follows:

  1. The asset management system layer should be the ‘source of truth’ that is updated whenever a new asset is created.
  2. With the editable GIS feature class, an editor creates a new feature by just creating a polygon (no other attributes will be populated other than the SHAPE__Area, SHAPE__Length and OBJECTID attributes) in the feature class. 
  3. FME script will run that replicates the attributes from the asset management system (all attributes except any geometry/lat/long values) to update the existing record that the user has added in the geometry/shape for in the step above. This would hopefully minimize any redundancy in data entry.

I was curious to see if there was a way to ensure that the Writer just updates/edits the record that the editor has edited rather than using the ‘Insert’ and ‘Truncate Existing’ parameters that from my understanding, wipes out the whole table and re-writes it all. I’d want the Writer to just populate the record that the user had just drawn the polygon for in the ESRI Enterprise Geodatabase.

Hopefully this makes sense.

Thanks so much in advance everyone!

Have you consider using a Change Detector transformer when updating databases.

You can read original SDE features and revised (new) Asset management systemsrecords separately and pass them to Original and Revised ports of the ChangeDetector respectively. 

In the ChangeDetector settings, 'Update Detection Key Attributes' should be selected. This could be one or more attributes acts as unique identifier to identify each record separately within each file and to match records between the two systems.

Then, 'Attribute Matching Strategy' can be set to test all attributes or only selected set of attributes for changes. Once you set the properties according to your requirements, the transformer should output unchanged, updated, new and deleted records via respective ports.

This transformer outputs a format attribute called fme_db_operation. On the database writer, you will need to configuration the table-feature operation is set to this fme_db_operation to all the Insert, Update and or delete operations. The table handling should be Use Existing. Be sure you use the Row Selection set to the unique identifier 
 


Reply