how to eliminate first two rows in seqential file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sateeshbabu
Participant
Posts: 48
Joined: Sat Oct 22, 2005 9:56 am

how to eliminate first two rows in seqential file

Post by sateeshbabu »

hi all,
how to eliminate first two rows from source seqential file

thanks
Stheesh bab
Plot No – B4, Jeevan Akshyay apts
8/14, 2nd Main Road, Jaya Nagar
Tambaram sanitorium,
Chennai-47.
smandepudi@gmail.com
naveen19
Participant
Posts: 52
Joined: Tue Mar 06, 2007 9:08 am
Location: India
Contact:

Re: how to eliminate first two rows in seqential file

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
senthilt1
Participant
Posts: 134
Joined: Mon Nov 19, 2007 2:17 am

Post by senthilt1 »

Hi,

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

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

Thanks,

SenthilP
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then try it. Under the conditions that I specified.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

senthilt1 - Hint: The "@INROWNUM" and "@OUTROWNUM" mnemonics are available in the Transform stage.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post 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
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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
prams
Participant
Posts: 73
Joined: Mon Apr 02, 2007 11:26 pm

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

Post by prams »

use filter in options of sequential file

by using this unix command

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