How to dived the data int diff targets
Moderators: chulett, rschirm, roy
How to dived the data int diff targets
Hi,
Actually in my source is seq file have a 20 records
those 20 records have to move to two diff targets......
mean 10 records one target another 10 records into other target....
which stages we need to use how to design the job
For Example in source i have a 20 records
in first trg 1,2...10
second tgg 11...20
which stages have to use ..& how plz desing the job
plz help me on this....
Thanks,
DN
Actually in my source is seq file have a 20 records
those 20 records have to move to two diff targets......
mean 10 records one target another 10 records into other target....
which stages we need to use how to design the job
For Example in source i have a 20 records
in first trg 1,2...10
second tgg 11...20
which stages have to use ..& how plz desing the job
plz help me on this....
Thanks,
DN
Last edited by dudam on Mon Jan 23, 2012 8:34 am, edited 1 time in total.
DN
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Are there criteria that specify which rows go to which targets? The stage that splits the rows might be a Filter stage, a Switch stage or a Transformer 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.
-
- Premium Member
- Posts: 139
- Joined: Fri Apr 11, 2008 1:02 pm
Re: How to dived the data int diff targets
Hi
i have tried this using a transformer it worked..
i used a stage variable
inside the stage variable
svx=1
if svx >20 then svx=1
in the 2 output link section i used the constraints
for records 1..10 .. 21..30 ...
constraint ( svx <11)
for records 11..20 ..31..40
contraints (svx>11)
...it may not be best solution. but it did the work...
cheers
dr
i have tried this using a transformer it worked..
i used a stage variable
inside the stage variable
svx=1
if svx >20 then svx=1
in the 2 output link section i used the constraints
for records 1..10 .. 21..30 ...
constraint ( svx <11)
for records 11..20 ..31..40
contraints (svx>11)
...it may not be best solution. but it did the work...
cheers
dr
-
- Premium Member
- Posts: 72
- Joined: Mon Jul 06, 2009 9:34 pm
- Location: Sydney
From the logic what i understood is that the value of svx will be added by 1 for every input row. This logic will only work if the config file has only one node. For multiple nodes the stage variable has multiple values on each node and it will add 1 to the current value depending on the partition.
Prakash Dasika
ETL Consultant
Sydney
Australia
ETL Consultant
Sydney
Australia
-
- Premium Member
- Posts: 139
- Joined: Fri Apr 11, 2008 1:02 pm
Assuming that you are incrementing svx by 1, which is not shown, then setting the Transformer stage to sequential mode will work, but...
What about the poor records where svx = 11? According to your tests, they are getting left out.
What about the poor records where svx = 11? According to your tests, they are getting left out.
Choose a job you love, and you will never have to work a day in your life. - Confucius
-
- Premium Member
- Posts: 139
- Joined: Fri Apr 11, 2008 1:02 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: