Dyanmic ESRI File Geodatabase Writer: Drop and Create not working
I am writing to a file gdb, I will need to run my workbench to update this file gdb each month. The schema of my incoming tables may change so I have used a schema scanner with a dynamic writer.
I want to use drop and create for table handling but it is not behaving as expected. Instead of dropping the existing feature class it just appends the entries to the existing table.
I am not sure why this is happening. Of note, my feature classes are also within feature datasets. See attached screenshot of writer settings.
Page 1 / 1
Hi, @pgammie.
Thanks for posting your question. Sorry that you’ve been having issues with the File Geodatabase writer. Wanted to ask beforehand, what version and build of FME Form are you running? Curious, as there has been some issues of this with some builds. Thanks!
Hello @AliAtSafe ,
I am using FME Form 2024.0.3
Hi, @pgammie,
Thank you for your patience, I appreciate it . As I work through the issue, just was curious if you had Overwrite Existing Geodatabase or Import XML Workspace Document enabled on your Dynamic File Geodatabase Writer? Thanks!
Hi @AliAtSafe ,
I did not have overwrite existing geodatabase or import xml workspace document enabled on my writer.
Best,
Paige
Hey, @pgammie.
Thanks for your patience! Got around to do some testing on my end and it seems to work using a point geometry dataset, SchemaScanner, and writing it out dynamically with ‘Drop and Create’ set. Wondering if your workflow is using a SchemaMapper in conjunction? If so (or not), is it possible to provide your workspace here too? Curious to see how you set it up.
Thanks!
...
I want to use drop and create for table handling but it is not behaving as expected. Instead of dropping the existing feature class it just appends the entries to the existing table.
…
One possible explanation is if both the Reader Features and the SchemaScanner Output Port pointing into the Writer.
This will make it look like an “Append” is happening, in that it is actually Dropping the Feature Class, and Inserting into a new Feature Class by the same name the original features + duplicate features coming from SchemaScanner.
Eg. A workflow similar to below can duplicate features in the write.
I separately notice that the workspace Writer appears to be writing in a Feature Dataset. Unless those Feature Classes are participating in a common Eg. Topology or Geometric Network, then this is unnecessary and can create issues in the extra “rules” that the ESRI API applies for writing to Feature Datasets.
Feature Datasets are often used incorrectly by ArcGIS Users who try to use them as “Folders”. This is not the way ESRI designed these to be used, they are instead to create extra editing restrictions and triggers between all objects and feature classes within the Feature Dataset. Classifying feature classes into groups of data is instead what the Geodatabase metadata is for, and will be less prone the writing problems if avoid using Feature Datasets unnecessarily.