You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/08/05 12:19:13 UTC

[GitHub] [nifi] simonbence commented on a diff in pull request #6234: NIFI-10256 CSVRecordReader using RFC 4180 CSV format trimming startin…

simonbence commented on code in PR #6234:
URL: https://github.com/apache/nifi/pull/6234#discussion_r938756002


##########
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java:
##########
@@ -79,6 +79,18 @@ public class CSVReader extends SchemaRegistryService implements RecordReaderFact
             .required(true)
             .build();
 
+    public static final PropertyDescriptor TRIM_DOUBLE_QUOTE = new PropertyDescriptor.Builder()
+            .name("Trim double quote")
+            .description("Whether or not to trim starting and ending double quotes. For example: with trim string '\"test\"'"
+                    +" would be parsed to 'test', without trim would be parsed to '\"test\"'."
+                    + "If set to 'false' it means full compliance with RFC-4180. Default value is true, with trim.")
+            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
+            .allowableValues("true", "false")
+            .defaultValue("true")
+            .dependsOn(CSVUtils.CSV_FORMAT, CSVUtils.RFC_4180)

Review Comment:
   Please add validator and displya name, something like:
   ```
   .name("trim-double-quotes")
   .displayName("Trim double quotes")
   .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
   ```
   
   Otherwise it looks good and after this change I will merge it



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org