Skip to main content
Question

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

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

takashi
Influencer
  • 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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings