The following node is available in the Open Source KNIME predictive analytics and data mining platform version 2.7.1. Discover over 1000 other nodes, as well as enterprise functionality at
http://knime.com.
File Reader
This node can be used to read data from an ASCII file or URL location.
It can be configured to read various formats.
When you open the node's configuration dialog and provide a filename,
it tries to guess
the reader's settings by analyzing the content of the file.
Check the results of these settings in the preview table. If the
data shown is not correct or an error is reported, you can adjust the
settings manually (see below).
The file analysis runs in the background and can be cut short by clicking
the "Quick scan", which shows if the analysis takes longer.
In this case the file is not analyzed completely, but only the first
fifty lines are taken into account. It could happen then, that
the preview appears looking fine, but the execution of the File Reader
fails, when it reads the lines it didn't analyze. Thus it is recommended
you check the settings, when you cut an analysis short.
Dialog Options
- ASCII file location
- Enter a valid file name or URL. When
you press ENTER, the file is analyzed and the settings pre-set.
You can also choose a previously read file from the drop-down list,
or select a file from the "Browse..." dialog.
- Preserve user settings
- If checked, the checkmarks and
column names/types you explictly entered are preserved even if
you select a new file. By default, the analyzer starts with fresh
default settings for each new file location.
- Read row IDs
- If checked, the first column in the file
is used as row IDs. If not checked, default row headers are
created.
- Read column headers
- If checked, the items in the first
line of the file are used as column names.
Otherwise default column names are created.
- Column delimiter
- Enter the character(s) that separate
the data tokens in the file, or select a delimiter from the list.
- Ignore spaces and tabs
- If checked, spaces and the TAB
characters are ignored (not in quoted strings though).
- Java style comment
- Everything between '/*' and '*/' is
ignored. Also everything after '//' until the end of the line.
- Single line comment
- Enter one or more characters that
will indicate the start of a comment (ended by a new line).
- Advanced...
- Opens a new dialog with advanced settings.
There is support for quotes, different decimal separators in
floating point numbers, and character encoding. Also, for
ignoring whitespaces, for allowing rows with too few data items,
for making row IDs unique (not recommended for huge files),
for a global missing value pattern,
and for limiting the number of rows read in.
- Click on the table header
- If the column header in the
preview table is clicked, a new dialog
opens where column properties can be set: name
and type can be changed (and will be fixed then).
A pattern can be entered that will cause a "missing
cell" to be created when it's read for this column. Additionally,
possible values of the column domain can be updated by selecting
"Domain". And, you can choose to skip this column entirely, i.e. it
will not be included in the output table then.
Ports
Output Ports
0 |
Datatable just read from the file |
This node is contained in KNIME Base Nodes
provided by KNIME GmbH, Konstanz, Germany.