Skip to main content
Hello guys:

 

 

I am looking for a way to delete several records from some tables that are "children" of a spatial feature class (SDE), prior to this layer to be refreshed.

 

 

The layer in question has two "child" tables, so the truncate option on FME does not work, as Oracle return an error regarding foreign key and child records found.

 

 

What I am looking for is for a little process that performs deletions in those two tables prior for the data to be loaded in the spatial layer.

 

 

I have been using a SQL Executor and linking the data to be loaded to the "Initiator" parameter of the SQLExecutor. Obviously, in this case the SQLExecutor is called as many times as the number of records that exist in the data source used to refresh the spatial layer, colliding and returning an exception that the "object is locked" (because is trying to delete the table every single time a feature is read).

 

 

If I leave the SQL Executor as a "standalone" transformer, it obvioulsy does not ever get executed.

 

 

Sorry guys, I am new in this FME world!! Any comment or help will be greatly appreciated.

 

 

Thanks in advance.

 

 

Richard.
Connect a Creator transformer to the initiator, set it to create one feature. You maybe also able use SQL Statement to Execute Before Translation parameter.
Excellent answer!

 

 

Thanks so much, it worked like a charm. It is all about knowing the transformers and how to make best use of them.

 

 

Thanks once again. I have a couple of more questions, but I will open a separate thread for not to confuse other people that may come across this same issue.

 

 

Best Regards

 

 

Richard.

Reply