2

I'm looking to use FME to either replace/overwrite a Feature Class, or just a to delete a feature class so I can 'write' the new one into that gdb.

Essentially I have constant new data being updated every week, so every week I need to archive 'some' of the feature classes in a GDB and import the updated data to the same GDB.

I have a workbench which takes the old data and archives it (easy), and can write the new data in. But of course it doesn't move the feature class, only copies it. Meaning I can't write the updated data in.

I've heard this can be done in Python, however I'm not overly experienced in this. I am happy to learn if anyone can provide some steps?

1 Answer 1

2

When you write the new data you can truncate the existing contents using the parameters in the writer feature type:

enter image description here

That way you're adding the new data into an empty table.

You can set different tables to do different actions, so you're only truncating the tables you want to add new data to.

Also, if you click the drop-down arrow to the right of that setting, you can create a user parameter, meaning you get prompted to set each table at run time, without having to go through all the individual dialogs.

2
  • side note: only applies to file geodatabases (if sde_geodatabase, users might not have permission to truncate) so fme_db_operation comes into play which is a longer fme workspace > knowledge.safe.com/articles/31697/…
    – Mapperz
    Commented Apr 16, 2019 at 21:08
  • This worked perfectly, thank you!
    – Kim
    Commented Apr 23, 2019 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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