Question

SQLExecutor Stored Procedure

  • 15 April 2013
  • 2 replies
  • 11 views

Can we use a SQLExecutor to run a stored procedure which will accept ref cursor and then process the entire recordset in the stored procedure? Can we pass the entire record set to a stored procedure or FME will process it one row at a time?

 

 

Also how can we fetch the list of column names from the passing features and store them into a attribute list?

2 replies

Userlevel 4
Hi,

 

 

not sure I completely understand what you're trying to do here, but it is definitely possible to run an Oracle stored procedure using an SQLExecutor. The code in the SQLExecutor will be executed once for every feature that enters it, not once for the whole recordset.

 

 

Be aware that the FME workflow doesn't really have a concept of a database cursor, as such, so you might have to look at alternative solutions.

 

 

To get a list of all the attributes available in the workspace at a given point, use the AttributeExploder (Exploding type: List).

 

 

You could also query the Oracle table for its columns, using an SQLExecutor with some like:

 

 

select column_name

 

from user_tab_columns

 

where table_name='MYTABLE'   David
Thanks David for the quick reply. I was having doubt about passing the entire recordset to the stored procedure at a time. Thanks for clearing my doubts.

Reply