even records one target,odd number records one target
Moderators: chulett, rschirm, roy
even records one target,odd number records one target
i have source like
deptno,sal
1,2000
2,3000
3,4000
1,2300
4,5000
5,1100
i want target like
target1
deptno,sal
1,2000
3,4000
4,5000
target2
2,3000
1,2300
5,1100
with out using transformerstage
deptno,sal
1,2000
2,3000
3,4000
1,2300
4,5000
5,1100
i want target like
target1
deptno,sal
1,2000
3,4000
4,5000
target2
2,3000
1,2300
5,1100
with out using transformerstage
-
- Participant
- Posts: 72
- Joined: Wed Dec 12, 2007 2:29 am
Questions like this worry me. Either they are interview questions (which bothers me in any case) or someone is looking for a complicated solution to a simple problem. The transform stage would easily do this using @INROWNUM or, if parallel processing is being done, by @PARTITIONNUM + ( @NUMPARTITIONS * ( @INROWNUM -1 ) ) + 1 and two output links. Such a simple, efficient and clear solution to the request and yet the OP is asking to do it another way. Why?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
lakNAR - he doesn't want to use a transform stage...
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I agree with Kim, why?
If it's odds and evens, you could use a two-node configuration and round-robin partitioning, or you could use a single-node configuration and a Column Generator and a Filter stage.
If it's odds and evens, you could use a two-node configuration and round-robin partitioning, or you could use a single-node configuration and a Column Generator and a Filter stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 4
- Joined: Mon Jul 05, 2010 1:21 am
If you want it to achieve without transformer ... First perform hash partitioning on deptno and sal and then you can use a row generator and generate rows for a new dummy column with initial value as 1 and increment by 1..
This way each row is assigned a unique value.. Now use filter stage and filter on the conditions as:
dummy_col%2<>0
dummy_col%2=0
This way each row is assigned a unique value.. Now use filter stage and filter on the conditions as:
dummy_col%2<>0
dummy_col%2=0
Varun Negi
Assistant System Enginner
TCS
Assistant System Enginner
TCS