Question

Using the FeatureWriter

  • 13 November 2019
  • 2 replies
  • 9 views

I'm using a FeatureWriter to create an Access Database and for the most part I'm very satisfied with the results.

However there are some quirks that I don't understand.

First, I didn't find anyway to update the created database each time I run the FME. I have to first delete the previous table to be able to generate a new one.

Is there a way to automatically update the table with each run of FME?

Secondly, in one instance, while FME shows 8 206 610 rows have been generated, only ~4000 have effectively been written in the Access database. I added an inspector before the FeatureWriter, and the inspector shows 8 206 610 rows.

Any idea on what happenned? what did I missed?


2 replies

Badge +22

There are parameters to truncate or drop the existing table, they should both be set to No. The writer mode should be Insert to add new records or Update to edit existing records (key attribute must be specified.

 

 

As for the dropped features, the logfile should give an idea. I could speculate that the features were missing a required attribute, or there was a primary key conflict, or the features per transaction might be off enough to cause an issue.
Userlevel 4

Have you checked the log for any warnings or unexpected messages that could explain the discrepancy?

You can e.g. use the DatabaseUpdater transformer to update the contents of an existing table. Alternatively you can use the fme_db_operation format attribute, which is documented here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/DatabaseWriterMode/feature_operations.htm

Reply