CSV Parser for file endpoint - Federated Directory Server
Use the CSV Parser to read and write data in the comma-separated values (CSV) format. To access the CSV Parser configuration parameters:
- Add a File endpoint.
- On the File endpoint configuration page, click Parser and select CSV Parser from the list.
- Expand the Parser section to view the parameters.
Parameters
- Field Separator
- Character used to separate each column, which is typically a comma or semicolon. The default value is a semi-colon (;).
- Sort fields
- Select this check box to write header fields in alphabetical (ascending) order. The default value is false.
- Comment
- Add your comments. The comment is not considered while parsing data.
- Detailed Log
- Select this check box to generate detailed log messages with extra information.
We can also configure the following advanced parameters. Under the Parser section, expand Advanced to view these parameters.
- Field Names
- Name for each column to which the parser must read or write. We can use the Field Separator between the field names, or specify each name on a separate line.
- The order in which you specify the column names controls the order in which the columns are written to the output file.
- Enable Quoting
- Select this check box to output with quotation marks during a write operation. This option is selected by default.
- If you clear this check box, the field is output as is, which can cause problems. When reading, quotation marks around the field are stripped if the Enable Quoting check box is selected. The parser is able to read quoted attributes that contain the column separator. If Enable Quoting check box is cleared, the parser returns unexpected values when the input contains fields that are delimited by quotation marks.
- Quote all fields
- Select this check box to output all fields independently with quotation marks, if they contain quotation mark, separator, or a new line.
- Write header
- Select this check box to output all the field names that are separated by the column separate on the first line. This option is selected by default.
- Write BOM
- Select this check box to write Byte Order Marker (BOM) to the file. You must also select Write header for this option to take effect.
- Log long lines
- Specify a maximum number of bytes for a line. The line numbers of lines that are longer than this maximum number are logged.
- Combine remainder in last field
- Select this check box to combine all extra fields from lines that exceed the number of defined fields into a new Remainder field. The fields, and implicitly, the number of fields, are defined by Field Names, or its absence, the first line of the file.
- Character Encoding
- Character encoding to use for reading or writing.
Parent topic:
File parsers