Settings
| Setting | What it is |
|---|---|
| File nameRequired | A file's name is the whole key — exports/report.csv is a name, not a folder. |
| Encoding | One read carries up to 5 MB; a larger file fails unless you read it in parts. |
| Offset | The byte to start at — 0, or the nextOffset of the previous part. |
| Length | Read at most this many bytes (up to 5 MB) — a part, never a failure. A text part ends on a whole character. |
| Allow a partial read | Past 5 MB, return the first part with truncated and nextOffset instead of failing. |
Technical details
| Key | Value |
|---|---|
name | texta file name, listed in `requires.files` |
encoding | "text" or "base64", by default "text" |
offset | number, by default 0 |
length | number |
allowPartial | true/false, by default false |
Output
| Field | Type |
|---|---|
nameFile name | string |
contentType | string |
sizeSize (bytes) | number |
binaryBinary (text reads answer metadata only) | boolean |
truncatedA part — the file goes on past it | boolean |
nextOffsetOffset of the next part (only on a part) | number |
textText (text encoding only) | string |
base64Base64 (base64 encoding only) | string |
Sample output, and the expression for each field
- binaryfalse
- contentType"text/csv"
- name"report.csv"
- size8
- text"a,b\n1,2\n"
- truncatedfalse
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"allowPartial": false,
"encoding": "text",
"name": "<file name>",
"offset": 0
},
"label": "Read",
"type": "file.read",
"version": 1
}