Input Data:
{ "name": "Coffee", "price": "$1.00" }
{ "name": "Tea", "price": "$2.00" }
{ "name": "Coke", "price": "$3.00" }
{ "name": "Water", "price": "$4.00" }
extension.yaml
input:
label: ""
file:
paths: [./input/*]
codec: lines
max_buffer: 1000000
delete_on_finish: false
pipeline:
processors:
- bloblang: |
root.name = this.name.uppercase()
root.price = this.price
output:
file:
path: "result/file1.log"
codec: lines
I want to create an output file based on the input and defined processor for our need.
extension.yaml
It will generate two output files "file1.log" & file2.log".
file1.log
file2.log
Here we can use something called 'Broker' in Benthos as shown in the above example.
It allows you to route messages to multiple child outputs using a range of brokering patterns.
You can refer to this link for more information: Broker