How to replace json value in query of ExecteSQL processor in nifi?

378 Views Asked by At

I am trying to replace value in the query that is fetched from another processor in nifi, How can I achieve this or what is the best way to do it? The processor details are as follows,

  1. Execute SQL Processor -> SELECT Rno FROM sampleDB WHERE operation = 1;
  2. SplitAvro Processor
  3. Convert Avro to Json -> Here I get following JSON {'Rno':'121'}
  4. Execute SQL Processor -> DELETE FROM NewDB WHERE Rno = X (here X should be replaced by the Rno received from previous processor that is '121')

How to achieve step 4 what processors should be used in addition to the above ones?

0

There are 0 best solutions below