Line Reader

This Node Is Deprecated — This version of the node has been replaced with a new and improved version. The old version is kept for backwards-compatibility, but for all new workflows we suggest to use the version linked below.
Go to Suggested ReplacementLine Reader

Read lines from a file or URL. Each line will be represented by a single string data cell in a single row. The row prefix and column header can be specified in the dialog.

Options

Line Reader

File or Files in folder
Select whether you want to read a file or multiple files in a folder. When reading files in a folder, you can set filters to specify which files to include (see below).
Read from...
Select a file system which stores the data you want to read. There are three default file system options to choose from:
  • Local File System: Allows you to select a file/folder from your local system.
  • Mountpoint: Allows you to choose a mountpoint. When selected, a new drop-down menu appears to choose the mountpoint.
  • Custom URL: Allows to specify a URL (e.g. file://, http:// or knime:// protocol). Browsing is disabled for this option.
To read from other file systems, click on ... in the bottom left corner of the node icon followed by Add File System Connection port. Afterwards, connect the desired file system connection node to the newly added input port. The file system connection will then be shown in the drop down menu.
File, Folder or URL
Enter a URL when reading from Custom/KNIME URL, otherwise enter a path to a file or folder. The required syntax of a path depends on the chosen file system, such as "C:\path\to\file" (Local File System on Windows) or "/path/to/file" (Local File System on Linux/MacOS and Mountpoint). For file systems connected via input port, the node description of the respective connector node describes the required path format. You can also choose a previously selected file/folder from the drop-down list, or select a destination from the "Browse..." dialog (browsing is not available for the Custom URL file system).
Include subfolders
When reading files from a folder, check this to include all matching files from subfolders of the defined folder.
Filter options
Press this button for file filtering options.
File filtering: File extension(s)
Enter file extensions used to filter files. Additionally, there is an option to choose whether the filter should work in a case sensitive or insensitive manner.
Note: A file extension has to be entered without the preceding dot. Multiple extensions have to be separated by a semicolon character (e.g. txt;log).
File filtering: File names
Select the desired filter method (regular expression or wildcard) and enter a valid expression to match the filenames of the files to be read. Additionally, there is an option to choose whether the filter should work in a case sensitive or insensitive manner.
File filtering options: Filter hidden files
Select if hidden files should be excluded.
Row header prefix
The prefix of the row headers (amended by a running index).
Column header
The name of the single output column.
Use first line as column header
If selected, the first line in the file will be used as column header. If it is used together with the "Limit number of rows" option it does not count as row.
Skip empty lines
If set, empty lines are skipped. This also includes lines only containing white space characters such as spaces or tabs.
Limit number of rows
If set, the node will not read more lines than specified. If "Skip empty rows" is selected, empty rows do not count as valid rows.
Match input against regex
If set, lines that do not match the specified regular expression are skipped.

Line Reader Encoding

Encoding
To read lines from a file that contains characters in a different encoding, you can select a character set in this tab (UTF-8, UTF-16, etc.), or specify any other encoding supported by your Java VM manually (type it in the box). The default value uses the default encoding of the Java VM, which may depend on the locale or the Java property "file.encoding"

Input Ports

Icon
The file system connection.

Output Ports

Icon
The lines as read from the file(s), each line represented by a single cell in a data row.

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.