Question

ESRI Geodatabase Writers: How to prevent TABLE creation

  • 22 March 2013
  • 7 replies
  • 1 view

Badge +9
  • Contributor
  • 101 replies
Hello

 

 

Is there a way to set up an ESRI Geodatabase Writer in a way, so that it will NOT automatically create a table that is not existing ?

 

 

Background: I want to stop with an ERROR if the writer tries to write to a non existing table. Target is to have the schema available before and to stop if it is incomplete instead af letting the writer create a missing table.

 

 

I went through the Writer docu but could not really find an answer to this.

 

 

Thanks

 

Michael

7 replies

Userlevel 4
Badge +13
Hi,

 

Did you try setting the ignore failed features to yes?

 

 

Badge +9
Hi

 

 

I intentionally set ignore failed features to YES and collect the errors for special reporting.

 

 

So what I need is: If a feature would cause a table to be created it should be rejected with an ERROR instead of creating a new table/Feature-Class.

 

 

If this breaks the translation or not should be controlled by the "ignore failed features" option, which is kind of an independent thing.

 

 

Meanwhile I found a setting in the "Format Parameters" which is "Table exists: yes/no". Couldn't find a docu about it ...

 

 

I will have to test this. Maybe this is what I need ... ?
Userlevel 4
Badge +13
Hi,

 

 

This sounds like a case for a dynamic translation since features that are not present in the output schema or mapped will be ignored by the writer.

 

 

or...

 

 

 

did the table exists parameter do the trick?

 

 

 

Hope this helps.
Userlevel 4
Hi Michael,

 

 

you could perhaps use a "Schema (from table)" reader on the desired feature class to check if it already exists. If something exits the reader you could send it to a Terminator.

 

 

David
Userlevel 4
Badge +13
Hi Michael,

 

 

You do seem to have found something we can't neatly do -- we do not have a parameter that will cause a failure when the table isn't there.  As others have suggested, having a first reader that is a Schema one and then checking what comes out from that to be sure that the table is already there could be one way -- though I'm first to admit this is not optimal. 

 

 

Another radical idea I have is to supply INVALID values for some of the other parameters that are used only when a table is created -- basically setting up for  failure when it tries to create.

 

 

But I'll ask the developers to see what we can do that is better.

 

 

Dale
Badge +9
Hi

 

 

I now tested some things with an MDB.

 

 

The option "Table exists: Yes" has no effect except greying out some options in the format settings dialog.

 

 

I also tried to find some invalid parameter values which would cause FeatureClass creation to fail. I was not creative enough to break it ;-(

 

This piece is really robust.

 

 

Seems Schema Reader is the only option left ...

 

 

Thanks so far

 

Michael
Userlevel 4
Hi Michael,

 

 

I just tested the solution with the Schema reader in FME2013 and it seems to work very well.

 

 

I also tried to enter some invalid table creation parameters on the FGDB writer but got the same results as you: FME really does a great job to ensure us from doing anything that is illegal! ;-)

 

 

David

Reply