Reputation: 25
Can any one help me how can we pass input with multiple lines to CSV node which has different columns/elements for each line.
I have a text file with below content
H|1|2|3|$|4|4
D|3|4|5
D|4|4|6
D|2|3|4
Here,how can we pass columns names for H-header,D-details differently to CSV node which generated JSON.
Thanks in advance!!
Upvotes: 0
Views: 129
Reputation: 59751
The best you can do is to use a switch node to split lines based on the first character and then run those lines through 2 separate CSV nodes.
The 2 CSV node can contain the header names for different line types.
The switch node should be configured something like this:
You can then combine the 2 legs of the flow again to consume the different messages for the output of the CSV nodes.
Upvotes: 1