The steps involved are:
- test the incoming features for a value which will determine whether the feature is an update, delete or insert
- add the attribute fme_db_operation to the features and assign it a value - either UPDATE/DELETE/INSERT
- set the UPDATE KEY COLUMN to an attribute that will match the input features to the database features - in this case it is the attribute "ID". For writers that do not have the Update Key Field use the fme_where format attribute
- change the WRITER MODE on the destination dataset to UPDATE (this causes the writer to recognize the fme_db_operation attribute)
The FME Format Attribute, fme_db_operation, is available on most of the database readers and writers. See the FME User Documentation
The second sample workspace focuses on the use of writer mode on the feature itself - see DataBaseWriterMode.fmwt.
Suggested Similar Articles
The Smallworld FME Translator 4.2.2 and higher supports incremental updates to the Smallworld VMDS. It utilizes the fme_db_operation attribute to specify the type of update - INSERT, UPDATE or DELETE
This example shows how to build an xfMap to read complex XML or GML.
The JDBC format allows access to many database formats. This article explains the requirements to set it up, provides a few sample workspaces and shows a list of databases that have been tested.
Example custom transformer which sets up the format attributes prior to using a database writer in UPDATE mode to update feature attributes only.
The Database writer is set to UPDATE mode, the fme_db_operation attribute may or may not be set, and a field has been identified as the key to finding the features to be updated but it doesn't appear to be doing the UPDATEs or DELETEs.