CSV Writer

This node writes out the input data table into a file or to a remote location denoted by an URL. The input data table must contain only string or numerical columns. Other column types are not supported.

This node can access a variety of different file systems. More information about file handling in KNIME can be found in the official File Handling Guide.

Options

Output file
The CSV file to write the data to.
Create missing folders
If enabled, missing folders in the specified path will be created automatically.
If exists
Specify the behavior of the node in case the output file already exists.
  • Fail: Will issue an error during the node's execution (to prevent unintentional overwrite).
  • Overwrite: Will replace any existing file.
  • Append: Will append the input data to an existing file.
File encoding
You can select a predefined character set (UTF-8, UTF-16, etc.), or specify any other encoding supported by your Java VM. The OS default uses the default encoding of the Java VM, which may depend on the locale or the Java property "file.encoding".
Compress file (gzip)
Check this if you want to compress the output file using gzip compression.
Column delimiter
The character string delimiting columns. A single tab character can be entered as '\t'
Row delimiter
Select the line break variation you want to use as row delimiter while writing the CSV file.
  • System Default: Use the line break of the operating system.
  • Linux/Unix Line break: Use newline (\n) as row delimiter.
  • Windows Line break: Use carriage return + newline (\r\n) as row delimiter.
  • Mac OS9 Line break: Use carriage return (\r) as row delimiter.
Write column headers
If checked, the column names will be written out in the first line of the output file.
Don't write column headers if file exists
If checked, the column headers will not be written when the output is appended to the already existing output file. This is particularly useful when the CSV Writer is used in a loop to report the results of each iteration.
Write RowIDs
If checked, the RowIDs will be added to the output, as first item in each line.
Quote character
The quote character used to enclose values with. See the "Quote values" option to specify what kind of values should be enclosed within quotes.
Quote escape character
The character is used for escaping quotes inside an already quoted value.
Quote values
Specify when to enclose values with quotes:
  • Strings only: Integer and floating point numbers are not quoted, all other data items are. (Selecting the decimal point as data separator will lead to an output that can't be read in again.) The quote character is escaped in quoted items.
  • If needed: Quotes are only placed around a data item that contains the data separator or if it equals the missing value pattern. The quote character will be escaped if it appears in a quoted data item.
  • Always: Every data item written out is placed between quotation marks. (The missing value pattern is not quoted though.)
  • Never: No data item is placed between quotation marks. You should specify a replacement pattern for the column delimiter, if it occurs in the data item.
Replace column separator with
Specify a replacement for the value used as a column separator. Used only if the 'Never' option is selected for Quote values.
Replace missing values with
Set this option to replace missing values from the input table with specific text when writing.
Number decimal separator
Specify a character that is used as decimal separator for floating point numbers.
Use scientific format for very large and very small numbers
Check this if you want very large and very small floating point numbers to be written in scientific notation (e.g., 1.0E9 instead of 1,000,000,000).
Append .0 suffix for decimal numbers without fractions
Check this if you want to write every decimal value with .0 suffix even though the value doesn't contain any fractional part. (e.g., the value 12 will be written as 12.0 if it is coming from a decimal column). Use with caution as this could lead to unnecessary increase of the file size. This doesn't affect the way to write values from integer columns. The option is ignored if we are using a scientific format.
Write name of file creator (KNIME username)
If checked, the login name of the user that created the file (probably you!) is inserted.
Write execution time
If checked, a comment line with the current execution time and date is added.
Write input table name
If checked, a comment line is added showing the name of the table the data was read from.
Write custom text
If you check this, you can enter any free text, that will be added then to the comment header.
Custom text
Enter the custom text to be added to the comment header.
Comment line marker
If you have checked at least one of the content options, you must provide a comment line marker that is used as a prefix for each comment line.
Comment indentation
Specify an indentation string, i.e., a prefix for every comment line.A single tab character can be entered as '\t'.

Input Ports

Icon
The data table to write out.
Icon
The file system connection.

Output Ports

This node has no output ports

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.