How do I skip headers in CSV file in WSO2 Micro Integrator

259 Views Asked by At

I am using smooks mediator to convert csv file to json using VFS. We have an option to skip header row while using the CSV connector/module. How do I skip the first row of headers while processing the file in WSO2 Integration studio using smooks?

1

There are 1 best solutions below

3
ycr On BEST ANSWER

In your Smooks configurtion add the following option.

skiplines="1"

Full Smooks Config

<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.5.xsd">
<csv:reader fields="name,age,address" separator="," quote="'" skipLines="1" />
</smooks-resource-list>