Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
10-10-2019
06:21 AM
- last edited on
10-10-2019
07:51 AM
by
VidyaSargur
Hi,
I have a Nifi workflow that puts data from MS SQL to Oracle. I have some queries that I used " binding" such as
...
where MUST.MID = ${MID} and not exists (select a_id from tbl_a where a_id = ${MID}).
But the variables behaves like "literal" variables on Oracle. (it runs everytime such as where MUST.MID = 50 and not exists (select a_id from tbl_a where a_id = 50))
What can I do for binding in Oracle part?
Thank you in advance.
Created 10-17-2019 06:15 AM
I found the solution: Create the procedure which takes parameter in Oracle side and use Execute SQL to run the procedure( give the flowfile attribute as the parameter of the procedure)
Created on 10-11-2019 01:34 AM - edited 10-11-2019 01:35 AM
I mean is there any way to set a parameter with a flowfile attribute and also send the query as it is binded(such as MID = :B😛)
Created on 10-11-2019 05:02 AM - edited 10-11-2019 07:04 AM
How Can I use the attributes of flowfile as a setter parameter to Oracle bind variable?
Example
variable Bdetail varchar(1000)
variable BMID NUMBER
variable BCont Varchar(1000)
:Bdetail := ${DETAILS}
:BMID := ${MID}
:BCont := '${CONTACT_TYPE}'
UPDATE TBLM SET Phone = :Bdetail
WHERE MUSTERI_ID = :BMID
AND :BCont = 'MOBILE'
Created 10-17-2019 06:15 AM
I found the solution: Create the procedure which takes parameter in Oracle side and use Execute SQL to run the procedure( give the flowfile attribute as the parameter of the procedure)