pbPassingBI
/
Node-based fundamentals beginner 6 min

Reading and writing files

CSV Reader, Excel Reader, writers, and reading many files at once.

What you'll be able to do
  • Configure the file readers
  • Read a folder of files
  • Write results out

CSV Reader

Point it at a file. The settings that matter:

  • Column delimiter — comma, semicolon, tab
  • Has column header — usually yes
  • Quote character
  • Encoding — the fix when accented characters come through wrong
  • Limit rows — read a sample while building

The Transformation tab is worth knowing: rename columns, change types and drop columns inside the reader, so you need fewer nodes afterwards.

Excel Reader

Choose the sheet by name or index, and set the row and column range where the sheet has titles above the data.

It can read several sheets in one node, appending them into one table — the equivalent of a union, without a separate node.

Reading a folder

The readers accept a folder rather than a file, with a filter such as *.csv and an option to include subfolders. Every matching file is read and concatenated.

Tick the option to append a path column so each row records which file it came from. All files must share the same structure; where they do not, read separately and use Concatenate, which can union by column name.

Type guessing

Types are guessed from a limited scan

The reader infers types from the first n rows. A column that looks numeric in the first thousand rows but contains text further down causes a failure mid-execution, or a silently wrong type.

Increase the scan limit, or set the type explicitly in the Transformation tab.

This is also how leading zeros disappear from postcodes and account numbers — set those columns to String explicitly.

Writers

CSV Writer, Excel Writer, Table Writer (KNIME's own fast format) and database writers.

The setting to check is the overwrite policy: fail, overwrite, or append. Append duplicates the data on every rerun, which is the usual cause of a table that keeps growing.

Key points
  • Readers can take a folder plus a filter to read many files at once
  • Type guessing scans a limited number of rows — set types explicitly for identifiers
  • Check the writer overwrite policy or reruns duplicate data
Check yourself