Question

Feature Class to Database field mapping

  • 18 March 2024
  • 3 replies
  • 46 views

Badge +1

Completely new to fme and trying to find my way.

I have a GIS feature class titled wMeter.  I want to take fields from this feature class and load the data into an existing excel database (provided by others). I added the feature class as a reader and the existing excel database as a writer and field matched which fields from the wMeter feature class I want to go into which fields in the database. I used an AttributeKeeper transformer to remove the unneeded fields from the feature class and it seemed to work at first however each time I ran the form it would append the data in the database. I changed the Writer Mode to Update so now it appears that I am getting the data 2X in my results.


3 replies

Userlevel 5
Badge +13

Are you saying that every time you run it, with the same input, it is adding more and more rows of duplicate data? And are you wanting to add in specific features, but not add them if they are already contained within the xlsx, or are you wanting to overwrite it completely?
This documentation may also help you: https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/xlsx/XLSX_writer.htm

Badge +1

Thank you for your assistance with this issue.

Initially, it was adding a duplicate copy of the data each time I ran it (Overwrite = No).  I changed the Writer Parameters to Overwrite = Yes and now it is duplicating the data once (even on the initial run of the operation).

The input has 12,306 records and the output has 24,614 records (2X because it also adds 2 Column headers).

Thank you again,

Doug

Userlevel 5
Badge +13

If you are wanting to overwrite the file completely for each run, and have set Overwrite to Yes, you can leave the writer mode as insert and then if you change the output location to a brand new file do you still get the same behavior? It may help if you have an example set of data and could attach your workspace and or a log file. Based on your screenshot it shows it is sending only 12,306 features to the writer so if it was truly overwriting the file, that is certainly odd if the output has 24,614.

Reply