I'm trying to split a csv file on lines. For this, I've tried alternatively with the following splitters on my flow:
<splitter expression="#[regex('^')]" doc:name="Splitter"/>
<splitter expression="#[regex('\n')]" doc:name="Splitter"/>
<splitter expression="#[regex('.*')]" doc:name="Splitter"/>
However, though the file has many lines, I'm getting the following message on the logs:
Splitter returned no results. If this is not expected, please check your split expression
Finally, I found a tutorial here with the solution: http://www.dotnetfunda.com/articles/show/2070/using-mule-studio-to-read-csv-comma-seperated-value-data-from-fileinbo
The splitter has to be configured this way:
And that requires the following element to be included on the flow:
This expression works for splitting CSV file :-
And if your CSV files have a column headers like Name, Age etc .. you can use this :-