052288064081042322OCT08TUL300AA3151MAINT ENTRY. AIRCRAFT NEEDS LMP DOWNGRADE DUE TO AUTOLAND IN 60 DAYS ******************** MEL
052288064081042322OCT08TUL300AA3151 *RESTR TO CAT I*. DUE TO 60 DAY EXCEEDENCE OF THE F.C.C
The key here is
052288064081042322OCT08TUL300AA3151
based on this I wanted to concatenate the Text field... please suggest on how to do this..
String Concatenation based on Keys
Moderators: chulett, rschirm, roy
String Concatenation based on Keys
Regards,
Ganesh
Ganesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Make sure that your data are partitioned on the key.
Sort the data by key, generating a Key Change column. If the data are already sorted, indicate this fact in the Sort stage.
In a Transformer stage stage variable maintain the concatenated string.
Downstream of the Transformer stage use a Remove Duplicates stage to preserve only the last record for each key value.
Sort the data by key, generating a Key Change column. If the data are already sorted, indicate this fact in the Sort stage.
In a Transformer stage stage variable maintain the concatenated string.
Code: Select all
If KeyChanged Then input.String Else svConcatenatedString : " " : input.string
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.
If you're on version 8.5 or higher, could you use the LastRowInGroup() function in the Transformer constraint to avoid a Remove Duplicates stage? You may also be able to avoid generating or testing a key change column, if you tested on LastRowInGroup() and altered the stage variable logic a bit. I think it should be possible, but I haven't tested it.ray.wurlod wrote:Downstream of the Transformer stage use a Remove Duplicates stage to preserve only the last record for each key value.
Last edited by qt_ky on Thu Jan 12, 2012 10:44 pm, edited 1 time in total.
Choose a job you love, and you will never have to work a day in your life. - Confucius