FUNCTION: @INROWNUM

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

prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

FUNCTION: @INROWNUM

Post by prasad_chennai »

Hi,

I am using a system variable @INROWNUM as one of the Stage variable.Below mentioned is my Condition.

IF @INROWNUM >= parhigherlimit then 1 else 0


Where 'parhigherlimit' is the parameter being passed.
problem i am facing here is:
say if my parameter parhigherlimit=3,then my condition will looks to be

IF @INROWNUM >= 3 then 1 else 0

But above condition is not holding good,its returning output as '1' only when parhigherlimit is equal to or greater than 5.
if its parhigher=3 or 4 then it will return '0'.
so what would be the issue here.

appreciate your responses,

Regards,
K.RaghavendraPrasad
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

Are you running the job with a single node configuration file?
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

throbinson,

Nope.I running jobs on 3 Nodes configuration file.Do you think it will matter for system variables.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

prasad_chennai wrote:throbinson,

Nope.I running jobs on 3 Nodes configuration file.Do you think it will matter for system variables.
There is your problem.....

When you are running it will create three INDEPENDENT instances of your transformer.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

Yes, Experts ..

You all got me right. Can anybody tell how to get worked out system variables for all the nodes.(i am using 2 sytem variables @Inrownum & @false in job design).For these variables to work,shall in need to make transformer as a sequential processing or i need to set any environment variable, plz let me know.

Thanks.
prasad
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

Yes, Experts ..

You all got me right. Can anybody tell how to get worked out system variables for all the nodes.(i am using 2 sytem variables @Inrownum & @false in job design).For these variables to work,shall in need to make transformer as a sequential processing or i need to set any environment variable, plz let me know.

is it possible to integrate records from all the nodes and get the incoming rowcount without making the processing as sequential.


Thanks.
prasad
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

Yes, Experts ..

You all got me right. Can anybody tell how to get worked out system variables for all the nodes.(i am using 2 sytem variables @Inrownum & @false in job design).For these variables to work,shall in need to make transformer as a sequential processing or i need to set any environment variable, plz let me know.

is it possible to integrate records from all the nodes and get the incoming rowcount without making the processing as sequential.


Thanks.
prasad
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

Do a search on @ num partitions or @ partition num

Mushed together. All one word. Others have responded better then I.
I don't want this to come up in this or future searches.
Also I would question your underlying design to ensure that you minimize ,or account for, skew across partitions. In other words, what if two partitions get three rows and the other only two for a total of 5 rows output? Will your row counting algorithm still be valid?
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

throbinson wrote:Do a search on @ num partitions or @ partition num

what if two partitions get three rows and the other only two for a total of 5 rows output? Will your row counting algorithm still be valid?
throbinson,
yes,what you have mentioned is right I think.I am not able to find how many rows moved to which node or like that.But if i have More than or equal to 5 rows,its perfect & getting exact output as required.No issue with more than or equal to 5 rows. (I mean my algorithm will stand Valid for 5 rows).


Thanks,
Prasad.
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

throbinson wrote:Do a search on @ num partitions or @ partition num

what if two partitions get three rows and the other only two for a total of 5 rows output? Will your row counting algorithm still be valid?
throbinson,
yes,what you have mentioned is right I think.I am not able to find how many rows moved to which node or like that.But if i have More than or equal to 5 rows,its perfect & getting exact output as required.No issue with more than or equal to 5 rows. (I mean my algorithm will stand Valid for 5 rows).


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

Post by ray.wurlod »

A Monitor on the job will show individual node row counts if Show Instances is selected.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

So how shall I get the integrated collection of the INRownum from all other nodes. (I think my @Inrownum is working for the single node now as i am not getting expected result.)

Thanks,
prasad
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

So how shall I get the integrated collection of the INRownum from all other nodes. (I think my @Inrownum is working for the single node now as i am not getting expected result.)

Thanks,
prasad
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

There is a post by vincent in the FAQ.....

This will help you put together your logic for multiple nodes...
viewtopic.php?t=95243
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Post by prasad_chennai »

Minhajuddin,
Thanks you,

Until i generate the Rownums will it be not possible to get the rowcount In Parallel edition.I dont want to generate any surrogate keys or something.As in Server jobs, we get total number of rowcount Incoming to the transformer stage if we use the system variable as @INROWNUM.
So why cant i use this one in Parallel edition,i know its depends on Number of nodes so how can aggregate all those rows into single node and get th INROWNUM value without making the transfomer stage sequential.When the rows move out of the transformer they should flow as they were before in all nodes.

looking Forward to your responses,
Prasad.
Post Reply