CSV

The CSV Connector supports reading and writing CSV files.

Connection Settings

File Directory

Specifies the root directory for file processing.

Processed File Directory

Specifies the directory where files are moved to after processing successfully. This is only used for inputs that enable “Process File”.

Error Directory

Specifies the directory where files are moved to after processing unsuccessfully. This is only used for inputs that enable “Process File”.

Input Settings

CSV File Name

The file name to read. This can be the full name of a single file or a regular expression. As an example, (.*).csv would match the first .csv file in the directory based on alphabetical order.

Relative Path

The relative path of the starting directory in regard to the connection level File Directory setting.

File Encoding

The encoding of the CSV file required to properly decode the file. Select Auto if the file has the correct BOM (byte order mark). In cases where the file has no BOM or an incorrect BOM, override the decoding by selecting one of the available options.

Skip Lines

How many lines to skip from the front of the file. Use this setting to skip header lines or other data that is not required.

Max Rows

The max number of rows in the file. Leave this blank if you just want to read to the end of the file. Set this if you only want to read up to N rows.

Max Rows Per Read

The max number of rows to return from a single read. As an example, if there are 1000 rows and this is set to 10, only 10 rows would be read at a time. When Index File is on, the first read will be records 0 to 9, second read will be 10 to 19, etc. When left blank, this defaults to 100.

Replacement Headers

Delimited separated list of headers used to replace the file headers, or provide headers (e.g., header1, header2, header3).

Note: There must be a header for each column of data.

Delimiter

Specifies the delimiter used to separate headers and fields. The default delimiter is a comma. Only single character delimiters are supported.

Quote

The quote character used by the CSV parser. Defaults to ". Supports the following escaped characters \t (tab), \r (return), \n (newline). Leave this blank to disable quoting.

Escape

The escape character used by the CSV parser. Defaults to \. Supports the following escaped characters \t (tab), \r (return), \n (newline). Leave this blank to disable escaping.

Process File

When enabled, the file is moved to the connection’s processed directory after being read.

Output Settings

File Name

Specifies the name of the file to write to. This includes the file extension and directories. The file path can include dynamic outputs (e.g., /{{this.site}}/file.csv)

Relative Path

The relative path of the starting directory in regard to the connection level File Directory setting.

Delimiter

The delimiter to use in the output file. By default, this is a comma.

Create

When enabled, the file and directory structure are created if they do not exist. If they do exist, data is appended to the end of the file.