Skip to main content
Question

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

  • February 25, 2019
  • 2 replies
  • 101 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • February 26, 2019

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.


david_r
Celebrity
  • February 26, 2019

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