Pentaho

 View Only

 I wanted to load only header to the output file. Is there any option without java code

Jump to Best Answer
EN Ratnam's profile image
EN Ratnam posted 03-22-2022 06:43
i have requirement like I wanted to load only header to the output file. Is there any option without java code.

suppose the input file as mentioned below 

id,name,loc
12.0,na,bang
13.0,amu,bang
14.0,taj,bang
15.0,kal,bang

Output file should be:
id,name,loc
Ana Gonzalez's profile image
Ana Gonzalez Best Answer
If you use the Text file input step to read the file, you can uncheck the option to indicate there is no header row, and check the option to add a rownum field to add a column with the number of line of your file. You'll have to give column names manually to the file, and after the Text file input step you add a Filter rows step where you filter the column with the number of line with value 1.
EN Ratnam's profile image
EN Ratnam
I got the solution and find the below ktr for that.