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_CODE INTEGER,
OUT OUT_ERROR_TEXT VARCHAR(1000),
OUT OUT_SQL_STMT VARCHAR(30000)
)
so I'm trying this in putSQL
CALL MYPROCEDURE.PROC1('N', ?,?,?,?)
and I need to supply sql arg attributes... like...
sql.args.1.type = 1
sql.args.1.value = not sure what to put here
sql.args.2.type = 4
sql.args.2.value = not sure what to put here
etc...
Am I on the right track?
Thanks
On Mon, Feb 27, 2023 at 8:50 PM Matt Burgess <[email protected]> wrote:
> 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 Stepanov <[email protected]> wrote:
>
>
> 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 <[email protected]>
> 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 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
>>
>> Thanks
>> Phil
>>
>
>