Created 04-06-2016 12:02 PM
Can I execute stored procedure on database using ExecuteSQL proessor ? Is there any sample ?
Created 04-06-2016 12:16 PM
I don't think so but maybe you can wrap the exec storedprocedure into a shell script or groovy and run it in ExecuteProcess/ExecuteScript?
Created 04-06-2016 12:16 PM
I don't think so but maybe you can wrap the exec storedprocedure into a shell script or groovy and run it in ExecuteProcess/ExecuteScript?
Created 04-07-2016 06:27 PM
Thank You @Artem Ervits for your suggestion. I was able to call my stored proc using sqlplus and ExecuteProcess processor. Amazing community !
Created 04-07-2016 06:31 PM
Please post a screenshot, it's a great question.
Created on 04-08-2016 02:31 AM - edited 08-18-2019 05:09 AM
@Artem Ervits My database is Oracle, so I used sqlplus to execute a script. Where script has following content.
execute spname(param) exit
I used ExecuteProcess processor to call sqlplus
Note: This approach assumes that client tools for database are installed on NiFi Server.
Created 04-08-2016 03:44 AM
awesome!!!
Created 04-09-2016 12:59 AM
@Shishir Saxena check this out, you inspired this http://funnifi.blogspot.com/2016/04/sql-in-nifi-with-executescript.html
Created 12-01-2016 04:19 PM
It was really helpful. I used the same method to run a stored procedure on MSSQL using SQLCMD :
SQLCMD -S server_name -U user_name -P password -i sample.sql
and in sample.sql I put:
exec sp_name sp_parameters
Then I used ExecuteProcess to call SQLCMD along with its parameters.
Created 04-11-2017 01:36 PM
Yes, you can.
Checking the source code, if you set "true" for generate key in "putSql", it will use executeUpdates rather than executeBatch(). It works if you don't need any output from your SP
Created 08-13-2017 09:13 AM
I have tried calling mysql sp with putsql processor.Its worked for me.
my so doesn't return any values only does some insert operations.
thanks @Yilin Han