Reputation: 49
I am working on a csv file and format of csv file is very similar to :
FIRST LINE---FIRST LINE---
deptno,dname,loction
10,ACCOUNTING,NEW YORK
20,RESEARCH,DALLAS
30,SALES,CHICAGO
40,OPERATIONS,BOSTON
Now I want to skip 1st line (), when this file will be read by csv input or text input step. 2nd line is header.
Is there any method or transformation to achieve this requirement?
At this moment, I am CSV File input but I don't find. I'm using Pentaho 5.0.1
PS : Sorry for my english
Thanks a lot
Upvotes: 2
Views: 6058
Reputation: 799
You could put your strange string in the fields tab ("FIRST LINE---FIRST LINE---") as it would be a regular header. Then you split all the rows with a split fields step.
Otherwise you could use the "Load file content in memory" step and check, in the content tab, the rownum field. Then you can use the "filter rows step" to skip the first one. After this you can put everything in a new csv file, which should be correct.
Upvotes: 3
Reputation: 4238
You can define the header rows on the tab Content of the text input component. See the following screen shot.
Upvotes: 1