Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to I call Mysql Stored procedure with parameters in Nifi

How to I call Mysql Stored procedure with parameters in Nifi

Explorer

There are stored procedure called "metrics" located in DB and our developers call it using below statement in their java code:

call metrics("2019-07-11", "2019-07-11");

I want to call thsi stored proc in NIfi.

I tried using EXECUTESQL process

SQL Select query : exec metrics "2019-07-11", "2019-07-11"


But i ended up with below error:

2019-07-30 09:28:44,305 ERROR [Timer-Driven Process Thread-6] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=2db2f9e6-016c-1000-0630-ea99857e68f0] Unable to execute SQL select query exec metrics "2019-07-11", "2019-07-11" due to java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exec metrics "2019-07-11", "2019-07-11"' at line 1. No FlowFile to route to failure: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exec metrics "2019-07-11", "2019-07-11"' at line 1

java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'exec metrics "2019-07-11", "2019-07-11"' at line 1



can you please suggest a better way to call these sp's.

Don't have an account?
Coming from Hortonworks? Activate your account here