Hi Raymond,

Let's say you have an input flowfile that contains an xml message with a root 
node <RootMessage> xml message </RootMessage>


You can use EvaluateXPath to extract out the content of the flowfile into a 
custom property

Destination = flowfile-attribute

New Property  message = /RootMessage


Next create an instance of ReplaceText processor to replace all the content of 
the flowfile

Replacement Value = EXEC SP.INSERT_XML(XMLTYPE(${message})


Next create an instance of PutSQL processor and set the JDBC Connection Pool 
accordingly.  (Note: make sure the stored proc body does not return a data set 
via select, currently PutSql does not support that.)


That should do it.


HTH,

Keith

________________________________
From: ski n <raymondmees...@gmail.com>
Sent: Friday, June 10, 2016 7:05 AM
To: users@nifi.apache.org
Subject: How to call a stored procedure

I want to call a stored procedure as follows:

BEGIN SP.INSERT_XML(XMLTYPE(${message}); END;

I have two questions:

1) I want to use the flowfile content as input parameter. How is this
done with the expression language?
2) Are stored procedures supported by a processor (PutSQL or
ExecuteSQL) without the use of external tools?

Reply via email to