Question

How to read/display output of SQL CREATOR/EXECUTOR in FME ?

  • 25 February 2019
  • 2 replies
  • 18 views

I am returning a variable string from oracle stored plsql function. Function is executed successfully in sql creator without an error. I need to know how/where to see/populate the output returned from stored function.


2 replies

Userlevel 2
Badge +17

If the SQL is a SELECT statement, the records in the result table will be output via the Result port of the SQLCreator as features. You can see the contents of them with the FME Data Inspector if you connect an Inspector to the port and run the workspace.

Userlevel 4

As @takashi says, if you want to return data from Oracle it needs to come from a SELECT statement.

There are some ways to force e.g. function return values into a table structure, however. Example:

SELECT *
FROM TABLE(my_schema.my_package.my_function(
  param1 => '@Value(fme_attribute1)',
  param2 => '@Value(fme_attribute2)'
))

This will execute my_function() with the string parameters param1 and param2 based on the FME attributes fme_attribute1 and fme_attribute2. The return value(s) of my_function() will be returned in FME.

You can find more information about this technique in the Oracle docs as well as here:

https://renenyffenegger.ch/notes/development/databases/Oracle/PL-SQL/collection-types/return-table-from-function/index

Reply