I have a feature writer that writes standalone tables to a file geodatabase reading from a non spatial Oracle database. I'm trying to understand the full functionaility of each table handling option. A description is at
Esri Geodatabase (File Geodb) Writer Feature Type Parameters (safe.com) but I'd like more information. I'm trying to understand which table handling operation I should select. The first time the tool is run the FGDB is empty and so 'Create if Needed' is the probable option. What if I need to run it a second time, would I need to change every reader in my workbench to 'Truncate Existing'? If there are new tables that need adding in future would I need to do the same on the new reader?
Hi Matt
There are two properties in play, feature operation and table handling.
If you are always replacing the table data entirely then insert feature operation and drop and create table handling is simple. This will also create the table if it doesn't exist.
If the table has relationship classes though, dropping the table will also drop the relates (which Data Interoperability cannot recreate), in which case you need to insert features with a truncate existing table handling.
Most elegant is to also read the existing state of the target table, use a ChangeDetector transformer to figure out the delta, then use fme_db_operation feature operation to do insert, update and delete operations as required. Be aware though that ChangeDetector is brutally strict, things like date precision matter if you include datetimes in the compare.
If you use the same file gdb to add new tables, you don't need to add a new reader. When adding new tables to the same FGDB, use the Add Feature type menu item from the Writers menu. It helps keep your workspace clean and easier to manage.
Thanks both, I'll give them a shot.