I'm trying to call stored procedure created in oracle database using logstash jdbc pipeline but even I tried with many ways to pass stored procedure in statement it's getting failed with sql error exceptions . please help me with correct way to configure this.
Note: I'm able to execute stored procedure in sql developer client and it's working fine.
tried all the commented statements one after other but no one is working
What are you intending to do? A jdbc input only makes sense when the procedure really is a function and returns something that can be processed lateron. In this case, you could use something like statement => "Select <package>.<storedprocedure>() FROM DUAL"
Okay, I understand. In my opinion, there are 3 options:
Convert your procedure into a function which retuns a dummy value so that you can use select procedure() from dual to call it from within logstash.
Remove the stored procedure and use the SQL used in it directly in the jdbc input. Depending on the complexity, this might not be possible.
Do not trigger the procedure in Logstash and run it as a database scheduler instead.
I would prefer (3) and create a scheduler that calls the procedure regularly and thus updates your temporary table. Logstash can then rely on the table always being up-to-date without worrying about refreshing the table.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.