[
https://issues.apache.org/jira/browse/NIFI-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15383255#comment-15383255
]
ASF GitHub Bot commented on NIFI-1942:
--------------------------------------
Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/476#discussion_r71247145
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateCsv.java
---
@@ -408,9 +407,12 @@ public void process(final InputStream in) throws
IOException {
listReader.read();
}
while(listReader.read(cellProcs) != null) {}
- } catch (final IOException |
SuperCsvCellProcessorException e) {
+ } catch (final IOException e) {
valid.set(false);
logger.error("Failed to validate {} against schema due
to {}", new Object[]{flowFile}, e);
+ } catch (final SuperCsvCellProcessorException e) {
+ valid.set(false);
+ logger.info("Failed to validate {} against schema due
to {}; routing to 'invalid'", new Object[]{flowFile}, e);
--- End diff --
Actually some form of this should be made into an attribute to be added to
invalid FlowFiles. That way users can know what is actually invalid.
> Create a processor to validate CSV against a user-supplied schema
> -----------------------------------------------------------------
>
> Key: NIFI-1942
> URL: https://issues.apache.org/jira/browse/NIFI-1942
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Pierre Villard
> Assignee: Pierre Villard
> Priority: Minor
> Fix For: 1.0.0
>
> Attachments: ValidateCSV.xml
>
>
> In order to extend the set of "quality control" processors, it would be
> interesting to have a processor validating CSV formatted flow files against a
> user-specified schema.
> Flow file validated against schema would be routed to "valid" relationship
> although flow file not validated against schema would be routed to "invalid"
> relationship.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)