Read CSV
Controlled node
Overview
The Read CSV node parses CSV files from your project library into structured data formats. It supports two output modes: a list of lists (raw row arrays) or a list of objects (dictionaries mapped to column headers). This node is essential for importing tabular data into your workflows for processing, transformation, or database insertion.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the CSV parsing operation. | - |
| File | FileSource | The CSV file to read from the library. Accepts text/csv mime type. | - |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the CSV has been successfully parsed and output is ready. |
| Output | Data | The parsed CSV data. Returns either a list of lists (arrays) or a list of objects depending on the Dictionary Result setting. |
Properties
| Property | Type | Description | Default |
|---|---|---|---|
| Dictionary Result | Boolean | When enabled, outputs data as a list of objects where keys are derived from the CSV header row. When disabled, outputs a list of lists (raw row arrays). | false |
Runtime Behavior and Defaults
The Read CSV node is a controlled node that executes when triggered by the Run event input.
File Handling:
- Accepts either a single file object or an array of files (uses the first file in the array)
- Supports legacy FileSource formats including checked document selections
- Retrieves files from project storage using the runtime project ID
Parsing Logic:
- Automatically detects and uses the first row as headers when Dictionary Result is enabled
- If Dictionary Result is
trueand headers are present, each row is converted to an object:{ header1: value1, header2: value2, ... } - If Dictionary Result is
falseor headers are missing, outputs raw arrays:[value1, value2, ...] - Handles both snappy-compressed and uncompressed storage formats
- Returns
'undefined'if the file is missing, project ID is unavailable, or parsing fails
Error Handling:
- Outputs
'undefined'and sets internal error state if:- No file is provided
- Project ID cannot be determined
- File metadata is missing from the database
- CSV parsing fails or returns no rows
Example
Basic CSV Reading
Connect a file selection node or a node that outputs file references (like Find Library Files or Get Library Files) to the File input, then trigger with a Start or Event node.
[Start] → [Read CSV] → [Show]
↓
File: my-data.csv
Dictionary Mode for Database Insertion
Enable Dictionary Result when you need object-style output for nodes like Insert Into Database that expect keyed data:
[Start] → [Read CSV] → [Insert Into Database]
↓ ↓
File: users.csv Table: users
Dictionary: true Rows: {{output}}
In this example, if users.csv contains:
name,email,age
John,john@example.com,30
Jane,jane@example.com,25
The Output will be:
[
{"name": "John", "email": "john@example.com", "age": "30"},
{"name": "Jane", "email": "jane@example.com", "age": "25"}
]
For CSV files larger than 100MB or with millions of rows, consider using the Read CSV Streamed node instead, which processes data in batches to manage memory efficiently.