Skip to main content
I need to perform a validation check on particular columns of all the participating tables in a Oracle database and log the validation errors in another logger table. I want to make a generic custom transformer for this so that it can be reused in several workbenches.

 

 

All other workbenches will import the custom transformer, connect the reader and specify the feature attributes that needs to be checked (e.g. null check). If the passing features have null values for the specified attributes, it will be logger in a logger table. Is this possible in FME? Any pointers conforming to best performance will be helpful.
Hi,

 

 

my general recommendation would be to try and carry out the majority checks in the database, whenever possible. To do that, I would use SQLExecutors and use FME to check the return values. The SQL in the SQLExecutors cold be dynamically created by your workspace, based on the custom transformer parameters.

 

 

David
Thanks David. I got the concept but I am exactly not sure about the following.

 

 

"The SQL in the SQLExecutors cold be dynamically created by your workspace, based on the custom transformer parameters." Do you have any link to a similar resource which will give more clarity?

 

 

I have one question about the approach. Since the check is done in a stored procedure at the DB end; for each passing feature it will make a database hit. Won't that degrade the performance?

 

 


Hi,

 

 

that will depend entirely on your checks, but I generally recommend doing the most in the database as that is almost always a lot faster than reading it into memory with FME.

 

 

If you only need to execute some code once for all features, look into using the Sampler transformer.

 

 

To build dynamic SQL for the SQLExecutor, look at the StringConcatenator. You can use the resulting string as the contents for the SQLExecutor.

 

 

Example:

 

 

select *

 

from "@Value(MYTABLENAME)"

 

where myColumn = '@Value(SOMESTRINGVALUE)'

 

David

Reply