diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java index 8eeb422ffc..a70ccf58f2 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java @@ -52,8 +52,8 @@ import java.util.Map; @Tags({"csv", "parse", "record", "row", "reader", "delimited", "comma", "separated", "values"}) @CapabilityDescription("Parses CSV-formatted data, returning each row in the CSV file as a separate record. " - + "This reader assumes that the first line in the content is the column names and all subsequent lines are " - + "the values. See Controller Service's Usage for further documentation.") + + "This reader allows for inferring a schema based on the first line of the CSV, if a 'header line' is present, or providing an explicit schema " + + "for interpreting the values. See Controller Service's Usage for further documentation.") public class CSVReader extends SchemaRegistryService implements RecordReaderFactory { private static final AllowableValue HEADER_DERIVED = new AllowableValue("csv-header-derived", "Use String Fields From Header", diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/resources/docs/org.apache.nifi.csv.CSVReader/additionalDetails.html b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/resources/docs/org.apache.nifi.csv.CSVReader/additionalDetails.html index ee712bf285..2a60e1c86d 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/resources/docs/org.apache.nifi.csv.CSVReader/additionalDetails.html +++ b/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/resources/docs/org.apache.nifi.csv.CSVReader/additionalDetails.html @@ -22,11 +22,13 @@
- The CSVReader Controller Service, expects input in such a way that the first line of a FlowFile specifies the name of - each column in the data. Following the first line, the rest of the FlowFile is expected to be valid CSV data from which - to form appropriate Records. The reader allows for customization of the CSV Format, such as which character should be used + The CSVReader allows for interpreting input data as delimited Records. By default, a comma is used as the field separator, + but this is configurable. It is common, for instance, to use a tab in order to read tab-separated values, or TSV. + The reader allows for customization of the CSV Format, such as which character should be used to separate CSV fields, which character should be used for quoting and when to quote fields, which character should denote - a comment, etc. + a comment, etc. The names of the fields may be specified either by having a "header line" as the first line in the CSV + (in which case the Schema Access Strategy should be "Infer Schema" or "Use String Fields From Header") or can be supplied + by specifying the schema by using the Schema Text or looking up the schema in a Schema Registry.