r-vandenbos commented on PR #7782: URL: https://github.com/apache/nifi/pull/7782#issuecomment-1737039702
@ChrisSamo632 @dan-s1 I have followed the ValidateRecord pattern and used a JsonTreeReader to inspect each record regardless if it is formatted JSON or NDJSON. Each record is then validated against the schema and based on the result it is appended to a valid or invalid flowfile which in the end are sent to their relevant relationships. I set record.count attributes for both flow files and the invalid flow file has an error message attribute (which I need to finish). @dan-s1 what is your use case for needing the whole file routed to invalid? As I write a record count attribute for valid records could you not use a RouteOnAttribute processor to validate if the record.count on the valid flow file is the same as the total record count (which I am presuming you have or can get)? If they are not the same then handle that in your flow? N.B Attribute names are up for change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
