Read File
Reads the content of files from various storage services.
A read operation happens according to the Read configuration. If reading On input, the input contains the used path. Otherwise, if reading Once, the path comes from the configuration.
The connection used varies with the Connection configuration. The Connection type From input is available only if reading On input. Otherwise, a static connection ID from Connection Management can be used.
For each opeation, the output is a file message. If Output in Batches is true, one operation may have many outputs.
The operator ignores directory inputs and produces no output. A directory input must have file.isDir set to true. Usually these inputs come from another operator such as List Files.
-
Amazon Simple Storage Service (AWS S3) (also supports S3-compatible services)
-
HANA Data Lake (HDL_FILES)
-
Microsoft Azure Data Lake Gen. 2 (ADL_V2).
-
SSH File Transfer Protocol (SFTP).
-
Local File System (/file) (it does not use a Connection ID. It is the file system presented in the System Management app, only for files found in /files/. The usage of the /files/ root path (or the /vrep folder) is deprecated.)
Configuration Parameters
|
Name |
ID |
Type |
Description |
|---|---|---|---|
|
Read |
mode |
string |
Mandatory. The operation mode. Details of each mode are found below. If Output in batches is enabled, each read operation may produce many outputs.
Accepted values:
Default: "On input" |
|
Connection (static) |
connection |
object |
Points to the static connection to read from. Only available if Read is set to Once. Default: {} |
|
Connection (dynamic) |
dynamicConnection |
object |
Points to the dynamic connection to read from. It uses the file connection attribute. Only available if Read is set to On input. Default: {"configurationType":"From input"} |
|
Path |
path |
string |
Points to the file to read, relative to the used connection. It must be in the qualified name format. If the Connection is set with a connection ID, you may use the UI file browsing to set the path. Only available if Read is set to Once. Default: / |
|
Output in Batches |
outputInBatches |
bool |
If true, each output uses batching attributes and has a body limited by Output batch size. Also, each operation may produce many outputs. Default: false |
|
Output Batch Size |
outputBatchSize |
string |
The maximum number of bytes placed in each output message. The value allows metric prefixes and an optional "i" to state binary bases (examples below). It is useful to reduce graph latency and memory usage. Only available if Output in batches is set to true.
Example values:
Default: 1MB |
Input
|
Input |
Type |
Description |
|---|---|---|
|
ref |
message.fileReference |
A file message pointing to the file to read. The body is ignored. If it is a directory, the operator ignores it, producing no output. |
Output
|
Output |
Type |
Description |
|---|---|---|
|
file |
message.file |
A file message with the contents of the file in the body. The message also has the updated connection, path, and size values in the file attribute. |
|
error |
message.error |
An Error Message, in case an error was raised during an operation. |