Support Questions
Find answers, ask questions, and share your expertise

Error Routing to Failure

Good afternoon everyone,

 

I have a problem with my flow in the processor "JoltTransformJSON" when I run the processor "ExecuteSQL" and no Oracle record returns to me.

 

leandrolinof_0-1621022533168.png

 

 

I would like your help to know what to do in this case.

 

Thank you so much.

1 ACCEPTED SOLUTION

Accepted Solutions

@MattWho 

 

I was able to use the following structure in the flow =

 

leandrolinof_0-1621279305463.png

 

leandrolinof_1-1621279333460.png

 

Thanks a lot for the help.

 

😃

View solution in original post

4 REPLIES 4

Master Guru

@leandrolinof 

The exception indicates "unable to unmarshal JSON to an object" which is commonly thrown when there is an issue with the source FlowFile content. For examples some unescaped Unicode characters like whitespace.

I'd inspect you source content.  I see in your dataflow that you have a convertAvrotoJson processor that took in a 2.08 KB content source FlowFile and output only a 2 byte content FlowFile.  Then later a ReplaceText processor that takes that 2 byte content and output 78 bytes.  So you'll want to inspect the content output there just before your JoltTransformJson processor.  

NiFi processor bulletins which you have shared will not return stack traces that may be produced by processor. Always best to check the nifi-app.log when you see a bulletin to see if maybe there is additional log output that can be helpful as well.

Hope this helps,

Matt

@MattWho 

 

I'm trying a different approach using "RouteOnAttribute" with the condition $ {CODE: contains ("N")} after "ConvertAvroToJSON"


I thought about putting this condition before all my flow.


So already valid if there is a record to be sent by Oracle.

 

But it is not working, a result of the always "unmatched" Even Oracle sending me "N".

 

Could you tell me if this condition I put in is correct?

 

leandrolinof_0-1621276444141.png

 

leandrolinof_1-1621276458926.png

 

leandrolinof_2-1621276554822.png

 

Sorry the correct property for this case is $ {CONTADOR: equals ('N')}

 

leandrolinof_0-1621277497245.png

 

@MattWho 

 

I was able to use the following structure in the flow =

 

leandrolinof_0-1621279305463.png

 

leandrolinof_1-1621279333460.png

 

Thanks a lot for the help.

 

😃

View solution in original post