Hi All,
I'm stuck with a scenario wherein I need to provide duplicates of a recod on conditional basis. E.g. In the transformer stage I may check for the type, and let's say if I get the condition type='A', then I need 3 duplicates of the current record. That is, if the input row is:
1,A,20455,"Fault Description"
Then since I find type='A', then I would want exactly three output rows for the same. i.e.,
1,A,20455,"Fault Description"
1,A,20455,"Fault Description"
1,A,20455,"Fault Description"
Is this possible using datastage?
Thanks & Regards,
Sriram Garikapati
Duplication of records using Datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 96
- Joined: Fri Apr 17, 2009 5:58 am
- Location: Delhi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes. Do the test in stage variables. Have three outputs from the Transformer stage, each constrained by the same expression. Use a Funnel stage downstream to bring them together if that's required.
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: 160
- Joined: Tue May 02, 2006 7:49 am
Hi Sriram,
If you are reading from a sequential file. Read as a complete row into a single column.
in the transformer stage,
After transformer stage convert row into column based on the delimter "-" then use column import stage to split the columns and finally load in to target.
Thanks,
Suresh
If you are reading from a sequential file. Read as a complete row into a single column.
in the transformer stage,
Code: Select all
StrVar1 Inputlnk.column:-
StgVar2 str(Inputlnk.column,3)
Thanks,
Suresh
-
- Participant
- Posts: 72
- Joined: Wed Dec 12, 2007 2:29 am