You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Michal Šunka (Jira)" <ji...@apache.org> on 2020/11/06 09:04:00 UTC

[jira] [Comment Edited] (NIFI-7983) Several SELECTs does not return correct values

    [ https://issues.apache.org/jira/browse/NIFI-7983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227249#comment-17227249 ] 

Michal Šunka edited comment on NIFI-7983 at 11/6/20, 9:03 AM:
--------------------------------------------------------------

It is all run as you see it, no alterations was done. The database in use is custom-made one.

And yes, I am not giving same name to all querries columns - see the use case - stored procedure returns something like dozen columns and 50 rows and returnCode is just a single number.

By the way, even if I give in all three SELECTs same alias, the problem persists.


was (Author: raocz):
It is all run as you see it, no alterations was done. The database in use is custom-made one.

And yes, I am not giving same name to all querries columns - see the use case - stored procedure returns something like dozen columns and 50 rows and returnCode is just a single number.

By the way, even if I give in all three selects same alias, the problem persists.

> Several SELECTs does not return correct values
> ----------------------------------------------
>
>                 Key: NIFI-7983
>                 URL: https://issues.apache.org/jira/browse/NIFI-7983
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 1.12.1
>            Reporter: Michal Šunka
>            Priority: Blocker
>         Attachments: NiFi_SELECTs.jpg
>
>
> If in ExecuteSQLRecord processor I use multiple SELECTs as in the following code (note, it all is in single instance of processor), the results are weird. First SELECT (1, 'Yeees') comes through okay as it should, but second and third seems to be processed (additional flowfiles are created), but these are _empty_.
> {code:java}
> SELECT 1 as 'Yeees'
> SELECT 0 as 'Noooooo'
> DECLARE @q int
> SET @q = 0
> SELECT @q AS 'qqq'
> {code}
>  
> The use case is to call stored procedure returning resultset and then select the returnCode:
> {code:java}
> DECLARE @retCode int
> EXEC @retCode = stored_procedure_giving_resultset
>         
> SELECT @retCode AS 'retCode_run'
> {code}
> I am using NiFi 1.12.1, DB is SAP ASE 16.0, db driver is jConnect (TM) for JDBC(TM)/16.0 SP02 PL06 (Build 27337)/P/EBF26829/JDK 1.6.0/jdbcmain/OPT/Wed Mar 15 03:15:38 PDT 2017 and trivially configured JSON recordset writer.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)