ROW NUMBER for sequential file stage

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
fmou
Participant
Posts: 124
Joined: Sat May 28, 2011 9:48 pm

ROW NUMBER for sequential file stage

Post by fmou »

Hi,

1. Is there an option to add a ROW NUMBER COLUMN to the reading sequential file in the sequential file stage? I read and searched through the Sequential File Stage section from the Parallel Job Developer's Guide, Version 7.5.1, but didn't find any.

2. Is there any way to pass how many rows are read from the sequential file to next stages?

Thanks
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

There is a property called RowNumberColumn. Please look at properties.
Cheers
Ravi K
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

1. It looks like that option was added in the 8.x release, so no.

2. You can generate the current row number if you are careful with any partitioning. If you need to know the total number of records while the job runs, you'll need to count them ahead of time and pass the count in as a job parameter.
-craig

"You can never have too many knives" -- Logan Nine Fingers
fmou
Participant
Posts: 124
Joined: Sat May 28, 2011 9:48 pm

Post by fmou »

You can generate the current row number if you are careful with any partitioning.
You are talking about not in the sequential file stage but in the following stage, eg, a transformer, right?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, via a stage variable in a transformer.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply