Page 1 of 1

how to eliminate first two rows in seqential file

Posted: Tue Aug 19, 2008 1:26 am
by sateeshbabu
hi all,
how to eliminate first two rows from source seqential file

thanks
Stheesh bab

Re: how to eliminate first two rows in seqential file

Posted: Tue Aug 19, 2008 1:46 am
by naveen19
sateeshbabu wrote:hi all,
how to eliminate first two rows from source seqential file

thanks
Stheesh bab
Hi,

For that u can use (Head -2) or else go before routine

P.S: make it clear where you want to use that so that you can get the clear picture you want like(Sequencer's or in seqentail file itself)

Regards..Naveen.K

Posted: Tue Aug 19, 2008 2:13 am
by ray.wurlod
Naveen.K wrote:For that u can use (Head -2) or else go before routine
head -2 gives the first two rows - it does not eliminate them.

Some shells allow the form head +2 which will eliminate the first two lines.

Otherwise use @INROWNUM > 2 as a constraint expression in a Transformer stage downstream of the Sequential File stage, running the Transformer stage in sequential execution mode.

Posted: Tue Aug 19, 2008 5:17 am
by senthilt1
Hi,

@INROWNUM>2 from the sequential file will solve this problem.

I am not sure about this........

Thanks,

SenthilP

Posted: Tue Aug 19, 2008 5:24 am
by ray.wurlod
Then try it. Under the conditions that I specified.

Posted: Tue Aug 19, 2008 7:03 am
by ArndW
senthilt1 - Hint: The "@INROWNUM" and "@OUTROWNUM" mnemonics are available in the Transform stage.

Posted: Tue Aug 19, 2008 7:22 am
by balajisr
Alternatively, you can enable Row Number Column in the sequential file stage. In the downstream transformer have a constraint as

Code: Select all

rowNumberColumn > 1

Posted: Sun Aug 24, 2008 10:35 pm
by abc123
@INROWNUM is by partition so if you have 2 partitions, you have to do:

@INROWNUM > 1 (1 per partition not 2) to eliminate the 1st 2 rows

use filter in options of seq file /usr/bin/sed '1,2d'

Posted: Mon Aug 25, 2008 12:40 am
by prams
use filter in options of sequential file

by using this unix command

/usr/bin/sed '1,2d'