Skip to content

SFTP Stream Read

Read and parse structured data files from an SFTP server. Supports CSV, JSON, JSON Lines, XML, TSV, and YAML formats with automatic format detection. GZIP-compressed files are transparently decompressed.

Requires an SFTP connection.

Configuration

FieldDescriptionNotes
SFTP ConnectionThe SFTP connection to useRequired. Select from your configured SFTP connections.
Source DirectoryThe remote directory to read fromSupports templates. A directory browser is provided. If left empty, defaults to the connection's root directory.
File PatternA glob pattern to match filenamesSupports templates. Examples: *.csv, data_*.json, report-2026-*.tsv
File Selection ModeWhich files to read when multiple match the patternSee table below. Defaults to Single File.
Data FormatThe format used to parse file contentsSee table below. Defaults to Auto-detect.
Decompress GZIP filesAutomatically decompress .gz / .gzip files before parsingEnabled by default.
Error HandlingHow to handle errors during file reading or parsingSee table below. Defaults to Fail on Error.

File Selection Modes

ModeBehavior
Single FileReads the first matching file
Multiple FilesReads all files matching the pattern and combines their data
Latest FileReads only the most recently modified matching file

Data Formats

FormatDescription
Auto-detectDetermines the format from the file extension (e.g., .csv, .json, .xml). Falls back to plain text if unrecognized.
CSVComma-separated values. The first row is used as column headers.
JSONA JSON array or object. Arrays produce one item per element.
JSON LinesNewline-delimited JSON. Each line is parsed as a separate item.
XMLXML document. Parsed into structured items.
TSVTab-separated values. The first row is used as column headers.

Error Handling Options

OptionBehavior
Fail on ErrorThe node fails immediately if any file cannot be read or parsed
Skip InvalidFiles that fail to read or parse are skipped; valid files are still processed
Collect ErrorsAll files are attempted; errors are collected and included in the output alongside successfully parsed data

Input

The node accepts an optional file_path input. If the Source Directory and File Pattern fields are left empty, the node will attempt to extract a file path from upstream data (looking for file_path, path, or file fields).

Output

When all files are read successfully, the node outputs a flat list of parsed data items. Each item includes metadata fields:

FieldDescription
_source_fileFull path of the file the item came from
_source_nameFilename only
_source_sizeFile size in bytes
_source_modifiedLast modified timestamp (UTC, ISO 8601)
_source_permissionsFile permission string

When using Collect Errors error handling and some files fail, the output is an object with:

FieldDescription
itemsArray of successfully parsed items
total_countNumber of successfully parsed items
files_readNumber of files attempted
errorsArray of error objects with file and error fields

TIP

Use Multiple Files mode with a pattern like data_*.csv to combine data from many files into a single stream for downstream processing.

TIP

When reading compressed files, the format is detected from the name after removing the .gz extension. For example, report.csv.gz is detected as CSV.