pvillard31 commented on code in PR #10279:
URL: https://github.com/apache/nifi/pull/10279#discussion_r2325316933


##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateCsv.java:
##########
@@ -142,6 +142,21 @@ public class ValidateCsv extends AbstractProcessor {
             .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
             .build();
 
+    public static final PropertyDescriptor MAX_LINES_PER_ROW = new 
PropertyDescriptor.Builder()
+            .name("Max Lines Per Row")
+            .displayName("Max Lines Per Row")
+            .description("""
+                    The maximum number of lines that a row can span before an 
exception is thrown. This option allows
+                    the processor to fail fast when encountering CSV with 
mismatching quotes - the normal behaviour
+                    would be to continue reading until the matching quote is 
found, which could potentially mean reading
+                    the whole file (and exhausting all available memory). Zero 
or a negative value will disable this option.
+                    """)
+            .required(false)
+            .defaultValue("0")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .addValidator(StandardValidators.INTEGER_VALIDATOR)

Review Comment:
   ```suggestion
               .addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
   ```



-- 
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]

Reply via email to