enter image description here

This is about the lower part of TesterNoType

In table 1 I have ex

Filename, Type, Date
Parks,    1,    2018-01-22
Parks,    4,    2018-01-22

Table 2 aka new information table I have information about 1000 parks In table 3 aka old information table I have 988 parks, some have stayed the same and should not be changed, some have old info about the type of the park

I have another workspace where I send the filename as Feature to Read and reads the table and writes to table 2.

In the old one with no types I only wrote the reader from the new and truncated the old and voila, but here I can't truncate, I want to both add all new rows and for every row that has type 1 for example (same obj id can happen in old and new or not).

I only want to replace every single row in table 3 that has type 1 and replace it with the information from table 2 instead. All that not has type 1 should still be there.

I'm doing a very simplified version of this now where I only read Parks, 1 and should read parks table from the old GDB and write to another GDB where I have the old version of Parks, but the writing part where I only want to replace where attribute type=1 doesn't seem to be working.

Should I do a SQL script somewhere or only read rows where type=1 or find another way to do this?

enter image description here

  • What is the FME version you use? – nielsgerrits May 4 '18 at 11:04

If you want to update an existing GDB several options are:

  • Set "Writer Mode" to "Update" (Navigator, Writer, Parameters, Advanced, Writer Mode) and use Update/Delete Key Fields.
  • Assign the attribute "fme_db_operation" with value "UPDATE" to each feature.
  • Run SQL after write. (Navigator, Writer, Parameters, Advanced, SQL To Run After Write)

The Update/Delete Key Fields are used to identify the rows in the target dataset. For file geodatabases this could be OBJECTID. (this generates the script UPDATE table_name SET column1 = value1, column2 = value2 WHERE OBJECTID = 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.