Last updated
Was this helpful?
Last updated
Was this helpful?
Stream JSON File Reader reads a local JSON file, applies a JSON Path expression, returns a JSON structure according to the defined expressions and triggers subpipelines to process each message. The component is to be used for large files.
Take a look at the configuration parameters of the component. Parameters supported by are marked with (DB)
.
No specific input message is expected, but the existence of a JSON file in the pipeline local directory and the filling of the File Name and JSON Path fields for the file processing.
total: total number of processed lines.
success: total number of successfully processed lines.
failed: total number of lines whose process failed.
When the lines are correctly processed, their respective subpipelines return { "success": true }
for each of them.
The component throws an exception if the File Name doesn’t exist or can’t be read.
The files manipulation inside a pipeline occurs in a protected way. All the files can be accessed with a temporary directory only, where each pipeline key gives access to its own files set.
Stream JSON File Reader makes batch processing, which means processing the data continuously and in a controlled manner in smaller batches.
file.json
File Name: file.json
JSON Path: $.products[*]
Each object inside the "products" array of the informed file will be processed in an independent way:
First subflow
Second subflow
Third subflow
Forth subflow
file.json
File Name: file.json
JSON Path: $.products[?(@.price < 80)]
Each object inside the "products"
array of the informed file will be processed in an independent way:
First subflow
Second subflow
file.json
File Name: file.json
JSON Path: $.products[?(@.price < 80)].product
Each object inside the "products"
array of the informed file will be processed in an independent way:
First subflow
Second subflow
Discover more about the Stream JSON File Reader component and how to use it on the Digibee Integration Platform.
File Name (DB)
File name or full file path (i.e. tmp/processed/file.json) of the local JSON file.
data.json
String
JSON Path
JSON Path expression that determines how the JSON file stream reading will occur.
$
String
Element Identifier
Attribute that will be sent in case of errors.
data
String
Parallel Execution Of Each Iteration
Occurs in parallel with the loop execution.
False
Boolean
Fail On Error
When active, this parameter suspends the pipeline execution if there’s a severe occurrence in the iteration structure, disabling its complete conclusion.
The Fail On Error parameter activation doesn’t have any connection with the errors occurred in the components used for the construction of the subpipelines (onProcess and onException).
False
Boolean