Execute DB2 stored procedue

2023-02-27 Thread Phillip Lord
Hello, Does anyone have any experience executing a DB2 stored procedure? Potentially using PutSQL? I don't think it can be done using ExecuteSQL, and I can likely use an executeStreamCommand to accomplish this. But trying not to reinvent the wheel if I can just do it using a simple Nifi processor

Re: Execute DB2 stored procedue

2023-02-27 Thread Dmitry Stepanov
We run our procedure using ExecuteSQL. Just make sure to use proper SQL syntax On February 27, 2023 2:09:19 p.m. Phillip Lord wrote: Hello, Does anyone have any experience executing a DB2 stored procedure? Potentially using PutSQL? I don't think it can be done using ExecuteSQL, and I can li

Re: Execute DB2 stored procedue

2023-02-27 Thread Matt Burgess
Stored procedures that take no output parameters and return ResultSets should work fine with ExecuteSQL, but for DBs that allow OUT and INOUT parameters, those won’t make it into the outgoing FlowFile (in either content or attributes). Regards, Matt > On Feb 27, 2023, at 4:19 PM, Dmitry Stepa

Re: Execute DB2 stored procedue

2023-02-28 Thread Phillip Lord
Thanks for replies... I'm trying putSQL to call the following stored-procedure... CREATE OR REPLACE PROCEDURE SMV.RUN_ALL_PS (IN IN_RESET CHAR(1), -> This will always be 'N" when called from nifi OUT OUT_SQLSTATE CHAR(5). OUT OUT_RETURN_CODEI

Re: Execute DB2 stored procedue

2023-02-28 Thread Matt Burgess
Philip, Those are OUT parameters so ExecuteSQL/PutSQL doesn't know how to get the values out after calling the procedure. We'd likely want a separate processor like ExecuteStoredProcedure and would have to figure out how to handle OUT parameters, maybe adding those fields to the outgoing records o

Re: Execute DB2 stored procedue

2023-02-28 Thread Phillip Lord
agh yes... that makes sense. Thanks Matt! On Tue, Feb 28, 2023 at 11:23 AM Matt Burgess wrote: > Philip, > > Those are OUT parameters so ExecuteSQL/PutSQL doesn't know how to get > the values out after calling the procedure. We'd likely want a > separate processor like ExecuteStoredProcedure an