SOURCE AND TARGET STAGE COUNT
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Wed May 15, 2013 1:22 am
- Location: Bangalore
SOURCE AND TARGET STAGE COUNT
Hi,
I need to get the link count for source and target for my jobs,i'm able to get source count using DSGetLinkInfo,since DSGetLinkInfo will always return the outgoing link count for a particular stage,its giving target stage count as 0 as target stage is last stage in my job.
source count is the outgoing link count from source stage,but for target that is the last stage.
so i need to get incoming link count to the target stage.
Please let me know how get the target count.
I need to get the link count for source and target for my jobs,i'm able to get source count using DSGetLinkInfo,since DSGetLinkInfo will always return the outgoing link count for a particular stage,its giving target stage count as 0 as target stage is last stage in my job.
source count is the outgoing link count from source stage,but for target that is the last stage.
so i need to get incoming link count to the target stage.
Please let me know how get the target count.
Cheers,
Schindler
Schindler
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
The input link to your target stage will be the output link to some stage, right? Pass the name of the penultimate stage that feeds your target as the 'Stage Name'.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 30
- Joined: Wed May 15, 2013 1:22 am
- Location: Bangalore
Is there any other option available ,since i can't hardcode the penultimate stage manually as there are more no.of jobs and also my src and tgt stage names are identical for all jobs ie.., src stage name starts with SRC and target with TGT.
so it would be more flexible ,if i can use TGT stage to get count,as i'm retrieving the job details from datastage repository table with where clause : where name like'TGT%'
Please let me know if there is any other option to get the row count flowing into the TGT stage
so it would be more flexible ,if i can use TGT stage to get count,as i'm retrieving the job details from datastage repository table with where clause : where name like'TGT%'
Please let me know if there is any other option to get the row count flowing into the TGT stage
Cheers,
Schindler
Schindler
-
- Participant
- Posts: 30
- Joined: Wed May 15, 2013 1:22 am
- Location: Bangalore
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
No you can not get these information using Universe stage since it is not stored in universe repository.
Which databse you are using for XMETA repository.I think your Opertation tables will be there in same database. If it is you need to connect to that database.
No you can not get these information using Universe stage since it is not stored in universe repository.
Which databse you are using for XMETA repository.I think your Opertation tables will be there in same database. If it is you need to connect to that database.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 30
- Joined: Wed May 15, 2013 1:22 am
- Location: Bangalore
-
- Premium Member
- Posts: 376
- Joined: Sat Jan 07, 2012 12:25 pm
- Location: Piscataway
If on DataStage 8.5 or below, this is what I could think of.
Disclaimer: There might be a more optimal solution than this.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
Link_Handle = DSAttachJob(JobName,DSJ.ERRNONE)
PenultimateStageName = DSGetLinkInfo(Link_Handle,TargetStageName,LinkName,DSJ.LINKSTAGE)
Ans=DSGetLinkInfo(Link_Handle,PenultimateStageName,LinkName,DSJ.LINKROWCOUNT)
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
Data Integration Consultant at AWS
Connect With Me On LinkedIn
Life is really simple, but we insist on making it complicated.
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
This is what i am doing in my project.
Output of the routine is rowcount,its can be Inputrowcount as well output rowcount,just you need to pass appropiate link name ,stage name and job name.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
JobName = JobNm
StageName = StageNm
LinkName = LnkNm
hJob1 = DSAttachJob(JobName, DSJ.ERRNONE)
RowInputCount = DSGetLinkInfo(hJob1,StageName,LinkName,DSJ.LINKROWCOUNT)
Ans = RowInputCount
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 30
- Joined: Wed May 15, 2013 1:22 am
- Location: Bangalore