Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 08-17-2022 06:56 AM
Hi guys:
It's possible to run Oracle stored proc that return a cursor as SP parameter using only NiFi processors?
Created 08-18-2022 02:11 AM
Running Stored procedures from NiFi sql based processors is not possible however you can use following suggestion suggested at https://community.cloudera.com/t5/Support-Questions/Execute-Stored-Procedure-of-MSSQL-in-Nifi/m-p/21...
Thank You.
Created 08-18-2022 12:30 PM
Using ExecuteSQL you can run stored procedures I have used before. The matter is when the stored procedure use output parameters to return results. Is there any processor to convert those ref parameters to flowfiles? My environment involve an Oracle database with stored procedures returning data as output cursors.
Created 08-18-2022 01:21 PM
Hi,
In the ExecuteSQL or ExecuteSQLRecord you have Pre Query, Select Query and Post Query properties. In the Pre Query can you declare variables to store the output parameters, run the stored proc passing those parameter and then insert them into a temp table which then you can use the Select Query property to read the values from the temp table and that will translate to flowfiles. If you are using the ExecuteSQLRecord you can define in which format you want the flowfile in by defining the record writer property. Hope that helps.
Created 08-22-2022 05:22 AM
Hi @SAMSAL:
I was trying to implement your solution but I didn't find a way to define a SYS_REFCURSOR in Pre-Query statements. Can you share any working simple example using Oracle DBMS?