Page 1 of 1

Reg LinkRowcount

Posted: Sun Jan 29, 2006 3:52 am
by raj_konig
Folks,

I am trying to capture the no of rows passing thru a particualr link. For this i am using the following code

"DSGetLinkInfo(jobhandler('test'), "Target", "Insert", DSJ.LINKROWCOUNT)"

where jobhandler is the userdefined routine to retireve the JobHandle for the job 'test'.

'Target' is my stage name.

'Insert' is my Link name.

Let me know is there any change to the above code as the reuslt is just showing '0' instead of no of records passed thru tht link.

rajesh

Posted: Sun Jan 29, 2006 4:02 am
by raj_konig
I got the row count.

Actaully I am using the wrong stage.

Stagename should be the name of the stage from which the rows start flowing into that link.

But how can we get the link row count if the data is flowing into passive stage(Sequential file) instead of active stage?

rajesh

Posted: Sun Jan 29, 2006 10:01 am
by chulett
From the Transformer in front of it. And if you ain't got one - add one. :wink:

Posted: Mon Jan 30, 2006 2:20 am
by raj_konig
I do have transformer before that.

Actually i have source table from which the data is coming into the transformer and based on some conditions i am splitting data into sequential file and into database table. i could be able to get the count of records inserted into the databse table as it is active stage. but could get the same for sequnetial file.

the job looks like this

SOURCE ---> TRANSFORMER-----> DATABASE TABLE
|
|
|
SEQUENTIAL FILE

Posted: Mon Jan 30, 2006 2:28 am
by raj_konig
Correction from my side regarding the way the job looks like,

actually the link for the sequential file is coming from transformer not from the source. which i couldnt represent here.


thanks
rajesh

Posted: Mon Jan 30, 2006 8:35 am
by chulett
Still, you should be able to use the Transformer name and the Link name going to the Sequential File stage from there to get how many rows went down it. Same for any Database stage.

Posted: Mon Jan 30, 2006 4:52 pm
by ray.wurlod
raj_konig wrote:Correction from my side regarding the way the job looks like,

actually the link for the sequential file is coming from transformer not from the source. which i couldnt represent here.


thanks
rajesh
Wrap your diagram in code tags, and use Preview to get it right.

Code: Select all

SOURCE ---> TRANSFORMER-----> DATABASE TABLE 
               | 
               | 
               V 
          SEQUENTIAL FILE

Posted: Tue Jan 31, 2006 1:03 am
by raj_konig
Craig,

I did the same thing but the result i am getting for a sequentail file is '0' but for a database the result is correct.

Thanks ray for the info.

rajesh