Page 1 of 1

Posted: Thu Jun 27, 2013 9:00 am
by crystal_pup
You can try something like this :-

1) Row generator as a source (generate let's say 200 rows)
2) Use a transformer stage and pass on @PARTITIONNUM system variable value to some output column for eg:- Part. Use Round robin partition on the input link.
3) Use an Aggregator stage and use Count method on the Part column and get the output in some output column for eg:- Cnt.

I tried it and I got the following result :-

Peek_6,0: Part:0 Count:50
Peek_6,3: Part:1 Count:50
Peek_6,3: Part:2 Count:50
Peek_6,1: Part:3 Count:50

Posted: Tue Jul 09, 2013 5:39 am
by srinivas.nettalam
crystal_pup wrote:You can try something like this :-
2) Use a transformer stage and pass on @PARTITIONNUM system variable value to some output column for eg:- Part. Use Round robin partition on the input link.
Round Robin may not necessarily used..depends on the data in specific cases and hence aggregation on the @PARTITIONNUM group is the solution and the rest varies as per the requirement.

Posted: Tue Jul 09, 2013 4:10 pm
by ray.wurlod
I suspect that the interviewers were seeking more in-depth knowledge of the DataStage API. In particular, the function DSGetLinkInfo() can retrieve the total row count for the link (DSJ.LINKROWCOUNT) or a list of row counts per instance (node) using DSJ.INSTROWCOUNT.

Posted: Fri Aug 09, 2013 4:15 pm
by kduke
dsjob command would be the other way.