Page 1 of 1

Remove Header

Posted: Tue Jun 30, 2009 12:45 pm
by kumar66
Hi All,

Is there any way to remove the header from the file . Where I am using file type as file pattern.

Bascially I am reading multiple files.

Please hel me on this.

Thanks & Regards,
Kumar66

Posted: Tue Jun 30, 2009 1:13 pm
by nagarjuna
Since you are using file pattern option , i think filter option wont be available in seq file stage .So , we can remove the headers with the help of transformer constraints

Posted: Wed Jul 01, 2009 12:34 am
by nirdesh2
You can use filter stage after reading the data from multiple files to drop the rows which is the header of the file.

Posted: Wed Jul 01, 2009 12:37 am
by ArndW
Under "options" in the sequential file stage you can specify "First line is Column Names" which effectively skips the first line.

Posted: Wed Jul 01, 2009 6:16 am
by chulett
Not with a file pattern and multiple files, unfortunately. :cry:

Posted: Wed Jul 01, 2009 6:19 am
by ArndW
Craig - I just had to run to a designer client and try that out, but now I know that you are correct.

Posted: Wed Jul 01, 2009 6:34 am
by chulett
Yah, would be cool if it worked and would certainly simplify things.

Posted: Wed Jul 01, 2009 2:57 pm
by Sainath.Srinivasan
Maybe you can filter them out in a stage or do 'grep -v' for something special in header.

Posted: Wed Jul 01, 2009 3:34 pm
by Kryt0n
Just had a look for myself, I still have the "First Line is Column Names" option when selecting File Pattern, haven't run it but why can't it be used?

Or stream in as single column and do a DCount - assuming header record has different number of columns as other rows - then send through a column import.

Posted: Wed Jul 01, 2009 3:56 pm
by chulett
Oh, you can certainly use it, it's just that it won't work on anything other than the first file from what I recall. :wink:

Posted: Wed Jul 01, 2009 4:25 pm
by Kryt0n
Ahhh, I see... so pretty pointless then... :)