hi my source is like
empno,sal
1,2000
2,4000
4,5000
3,6000
5,4500
6,3400
target is like
empno,sal,sequnum
1,2000,2
2,4000,4
4,5000,6
3,6000,8
5,4500,10
6,3400,12
plz tell me the clear logic for generate evennumbers and oddnumbers using transformer stage(stagevariables)
transformer stage problem
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 6
- Joined: Tue Jun 15, 2010 11:17 am
Both even and Odd in same output?
Looks like you need continues Sequence number.
If you want it seperately. Make the data to run in two node.
Make the Partition as Entire.
Run a SequenceGenerator.
One node will give you odd number and other will give you Even number.
For the same set of data.
Looks like you need continues Sequence number.
If you want it seperately. Make the data to run in two node.
Make the Partition as Entire.
Run a SequenceGenerator.
One node will give you odd number and other will give you Even number.
For the same set of data.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
hi
hi for the same table one of the case i want to genrate oddnumers likeanbu wrote:From your input sequnum=empno*2.
I dont see any odd numbers in your sequnum. Can you pl explain your requirement?
empno,sal,sequnum
1,2000,1
2,4000,3
4,5000,5
3,6000,7
5,4500,9
6,3400,11 like this please tell me the logic
-
- Participant
- Posts: 57
- Joined: Wed Oct 21, 2009 4:46 am
- Location: India
"sequnum=(empno*2) - 1" will solve the problem whereas "sequnum=(@inrownum*2)-1" needs sorting for the data provided.ETLJOB wrote:I don't think "sequnum=(empno*2) - 1" would solve the purpose for the given sample data, considering the fact that employee number is not in sorted order.sequnum=(empno*2) - 1
I believe "sequnum=(@inrownum*2)-1" would do for you.