I am trying to execute the PL SQL statement block above to run a procedure in Oracle in the KNIME SQL Database executor node and I keep getting this error:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following.
:= . ( % ;
I have also tried running this in the Database reader node and get the same error.
the Database SQL Executor node splits the statement into several statements based on ; and new line. So I guess the problem is that the node sends two statements to the db begin KNM_VALIDATE_STRUC(table_name); as first statement and end ; as second statement.
All statements that are send to the db are also logged in the KNIME log file. To view the log file open KNIME and go to View->Open KNIME log.
Thanks Tobias for the tip about the KNIME log! Seems like KNIME doesn't like the PL SQL block statement format. I also tried the exec KNM_VALIDATE_STRUC(table_name); to run a stored procedure in Oracle but got an invalid SQL statement error even though the statement runs in Oracle.
So any suggestions on how to run a stored procedure from Oracle in KNIME?
just add a space after the ; within the procedure body to prevent the split up of the query. Attached you can find an example of a workflow that creates and calls a stored procedure within MySQL which can be adapted to work also with Oracle. The workflow uses the Database Reader node with the option "Run SQL query only during execute, skips configure" enabled (which is the default) to call stored procedures and the Database Executor node to create new ones.