Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ValidateJson Log in case of validation failure

avatar
New Contributor

Is there a way to get or see the log message in case of validation failure of a flow-content versus the provided json schema ? 

1 ACCEPTED SOLUTION

avatar
Super Mentor

@Bgrilher 
I not completely clear on your ask here.

According to the ValidateJson processor documentation, a FlowFile Attribute is added to FlowFiles that are routed to the "invalid" relationship:

MattWho_0-1678283988952.png

You can route this "invalid" relationship via a connection to a logAttribute processor which can write a log line out to the nifi-app.log (default) with what was written to this FlowFile attribute.

If you are not actually looking to see it generate log output but just want to see what was written to this FlowFile attribute, you can use NiFi data provenance for this.  
Data provenance will give you ability to see FlowFile metedata for a FlowFile in all stages throughout the dataflow that FlowFile progressed.  You can also view and download the content (if it is still present in a NiFi dataflow or still present in NiFi archive) at by stage of its processing through your dataflow.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

 

View solution in original post

2 REPLIES 2

avatar
Super Mentor

@Bgrilher 
I not completely clear on your ask here.

According to the ValidateJson processor documentation, a FlowFile Attribute is added to FlowFiles that are routed to the "invalid" relationship:

MattWho_0-1678283988952.png

You can route this "invalid" relationship via a connection to a logAttribute processor which can write a log line out to the nifi-app.log (default) with what was written to this FlowFile attribute.

If you are not actually looking to see it generate log output but just want to see what was written to this FlowFile attribute, you can use NiFi data provenance for this.  
Data provenance will give you ability to see FlowFile metedata for a FlowFile in all stages throughout the dataflow that FlowFile progressed.  You can also view and download the content (if it is still present in a NiFi dataflow or still present in NiFi archive) at by stage of its processing through your dataflow.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

 

avatar
New Contributor
Perfect it whas exactly what I missed.

BR,

Bruno