Comments and answers for "Delete feature class from GDB then add feature class to same GDB?" https://knowledge.safe.com/questions/30481/delete-feature-class-from-gdb-then-add-feature-cla.html The latest comments and answers for the question "Delete feature class from GDB then add feature class to same GDB?" Comment by terezia86 on terezia86's comment https://knowledge.safe.com/comments/100345/view.html

Hi @takashi,


will this be also possible with relationships and domains?

I need to write a new data from .gdb "Set_A" into a "Set_B".

Till now we did it always manualy (deleted feature classes, relationships and domains from "Set A" and then with "copy" from "Set_B" pasted into a "Set_A")

now we want to do it automaticly (also automate it in FME Server), but we need to build the Workspace schema.

Do you have an Idea?

Thanks


星期二,2019年10月15日06:15:50格林尼治时间 terezia86
Comment by cwarren on cwarren's comment https://knowledge.safe.com/comments/30526/view.html

Thank you @takashi for all of your help!

Thu, 30 Jun 2016 16:22:54 GMT cwarren
Comment by takashi on takashi's answer https://knowledge.safe.com/comments/30486/view.html

aah, it could be simpler if you use the FeatureHolder transformer.

  1. GDB Reader: Read the PIPELINE features from the GDB1.
  2. FeatureHolder: Hold all features till the last one arrived.
  3. GDB Writer: Write them into the GDB1 with 'Drop Table' option.
Thu, 30 Jun 2016 05:14:07 GMT takashi
Answer by takashi https://knowledge.safe.com/answers/30485/view.html

Hi @madwarren, I think it's possible with this procedure in a single workspace (FME 2016).

  1. Read all PIPELINE features from the GDB1 using a GDB Reader.
  2. Write them into a temporary dataset using a FeatureWriter.
  3. Read the PIPELINE features from the temporary dataset using a FeatureReader (connect the FeatureReader to the Summary port of the FeatureWriter).
  4. Write them into the GDB1 using a GDB Writer with 'Drop Table' option.

You can import the PIPELINE feature class from the GDB2 when adding the writer.

And set 'YES' to the 'Drop Table' parameter for the feature type, so that the existing PIPELINE feature class will be deleted from the GDB1 before writing.

I think it works theoretically, but am afraid that an unexpected error could occur when deleting the existing PIPELINE feature class, because it has been corrupted. So I would recommend you to create a backup of the GDB1 before running the workspace.

Thu, 30 Jun 2016 05:07:20 GMT takashi