Page 1 of 1

DSJob functon

Posted: Thu Dec 08, 2005 9:00 am
by anandkumarm
I want to assign the inrow number value af link X to a variable in stage Y

Can i use the DSJ.LinkInrownumber.

Can I just put my link Name in this command?????

Any help is greatly Appreciated

Thank you

Posted: Thu Dec 08, 2005 9:15 am
by ArndW
You can access a link's value using @INROWNUM in the same transform. If you wish to use that value in another transform downstream, then add this value to a new column in the output derivation. I'm not sure I understood your question or problem, but this might answer it. If not, perhaps you could explain in a bit more detail what you are trying to do.

Posted: Thu Dec 08, 2005 9:23 am
by anandkumarm
ArndW wrote:You can access a link's value using @INROWNUM in the same transform. If you wish to use that value in another transform downstream, then add this value to a new column in the output derivation. I'm not sure I understood your question or problem, but this might answer it. If not, perhaps you could explain in a bit more detail what you are trying to do.
Ok here is what exactly I am doing..I have a job with 10 transformers.Lets say my 10 th transformer writes data to a file.I want to catch the inrow number at the 10 th transformer and give this value to a variable in transformer 1

I am doing This Coz I want to process the second record only after the first record pass thru the 10 th transformer...I would appreciate if youy can suggest me any new ideas.
Thank you

Posted: Thu Dec 08, 2005 9:28 am
by ArndW
If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?

Posted: Thu Dec 08, 2005 9:29 am
by kcbland
You can do this with a COMMON variable accessed using a custom FUNCTION, but you MUST disable row buffering, remove IPC stages, and disable read/writecaching for your premise to work no matter what. Another method would be to write the value to a single row hash file on the last transformer and reference it from the first transformer.

Posted: Thu Dec 08, 2005 9:33 am
by anandkumarm
ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??

Posted: Thu Dec 08, 2005 9:34 am
by anandkumarm
anandkumarm wrote:
ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??

Here is what the comand exactly is

DSGetLinkInfo (JobHandle, StageName, LinkName, InfoType)

Posted: Thu Dec 08, 2005 9:47 am
by anandkumarm
kcbland wrote:You can do this with a COMMON variable accessed using a custom FUNCTION, but you MUST disable row buffering, remove IPC stages, and disable read/writecaching for your premise to work no matter what. Another method would be to write the value to a single row hash file on the last transformer and reference it from the first transformer.
OOps I didnt understood exactly what you said..
I have to use IPC stages because of my jobs..(They HAve Transformers writng to LinkCollectors and LC wring to transformers..

What exactly you mean by Common variable. Is it Possible to Declare variable at Job Level Instead of Stage level. Environment variables wont work because Iam assigning A value to the variable in the job which is inrownumber...

Posted: Thu Dec 08, 2005 9:53 pm
by loveojha2
anandkumarm wrote:
ArndW wrote:If you do not have active-to-active stage interprocess buffering enabled then all the transforms will be executed by one process, and row 2 won't be read until row 1 processed; so there is no need for passing global values between stages. I don't understand why you have this restriction in your job design, though. Are you sure you need it?
What we are trying to do here is we do have some IPC stages in our jobs.So we only have this option .If we use RTI our performance is depreciating.So we are looking for an idea where we can process data just like RTI model which is one record at a time. but without using RTI....

There is a command which says
DSJ.(ME,ARG1,ARG2,ARG3).
Can i use link NAme in ARG 1 ,Stage NAme in ARG2 ,RowCount In arg3 for the above command ??
If you don't have any IPC stages between the transformer stages and you don't have the active to active interprocess buffering enabled then your objective is met, even if you have few IPC stages somewhere else in the Job design. Experts correct me if I am wrong. :?