nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Lim <Keith....@ds-iq.com>
Subject How does Nifi support calling a stored proc that returns a tabular result?
Date Thu, 05 May 2016 18:02:59 GMT
Does any Nifi processor support executing a stored proc that returns results via a select statement?
E.g.:

Create PROCEDURE dbo.MyStoredProc
AS
BEGIN
    ...—do something
    SELECT …
END

I tried using a Nifi ExecuteSql processor and in lieu a select statement, I entered “exec
dbo.MyStoredProc”
and got the below error.  Since this stored proc does not explicitly specify in parameter
of the return, is there any work around support for this?
What is Nifi current level of support for calling stored proc?

Thanks,
Keith

2016-05-05 10:07:03,842 ERROR [Timer-Driven Process Thread-4] o.a.nifi.processors.standard.ExecuteSQL
ExecuteSQL[id=e6f13092-8c25-4b4a-880b-90a54efc68d1] Unable to execute SQL select query EXEC
dbo.MyStoredProc due to org.apache.nifi.processor.exception.ProcessException: com.microsoft.sqlserver.jdbc.SQLServerException:
The statement did not return a result set.; routing to failure: org.apache.nifi.processor.exception.ProcessException:
com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
2016-05-05 10:07:03,845 ERROR [Timer-Driven Process Thread-4] o.a.nifi.processors.standard.ExecuteSQL
org.apache.nifi.processor.exception.ProcessException: com.microsoft.sqlserver.jdbc.SQLServerException:
The statement did not return a result set.
                at org.apache.nifi.processors.standard.ExecuteSQL$1.process(ExecuteSQL.java:160)
~[nifi-standard-processors-0.6.1.jar:0.6.1]
                at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:1954)
~[na:na]
                at org.apache.nifi.processors.standard.ExecuteSQL.onTrigger(ExecuteSQL.java:152)
~[nifi-standard-processors-0.6.1.jar:0.6.1]
                at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
[nifi-api-0.6.1.jar:0.6.1]
                at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1059)
[nifi-framework-core-0.6.1.jar:0.6.1]
                at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136)
[nifi-framework-core-0.6.1.jar:0.6.1]
                at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
[nifi-framework-core-0.6.1.jar:0.6.1]
                at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:123)
[nifi-framework-core-0.6.1.jar:0.6.1]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[na:1.8.0_77]
                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_77]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[na:1.8.0_77]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[na:1.8.0_77]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_77]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_77]
                at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a
result set.
                at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:800)
~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689)
~[na:na]
                at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) ~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
~[na:na]
                at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:616)
~[na:na]
                at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
~[na:na]
                at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
~[na:na]
                at org.apache.nifi.processors.standard.ExecuteSQL$1.process(ExecuteSQL.java:157)
~[nifi-standard-processors-0.6.1.jar:0.6.1]
                ... 14 common frames omitted






Mime
View raw message