IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
 View Only
  • 1.  Remove duplicates

    Posted Wed August 18, 2010 08:46 PM

    Originally posted by: SystemAdmin


    Hi I am having a xml input message

    <xml header>
    <xml detail>
    <xml data>111</xml data>
    <xml msg>its 111</xml msg>
    </xml detail>
    <xml detail>
    <xml data>112</xml data>
    <xml msg>its 112</xml msg>
    </xml detail>
    <xml detail>
    <xml data>111</xml data>
    <xml msg>its 111</xml msg>
    </xml detail>
    <xml detail>
    <xml data>111</xml data>
    <xml msg>its 111</xml msg>
    </xml detail>
    <xml detail>
    <xml data>114</xml data>
    <xml msg>its 114</xml msg>
    </xml detail>
    <xml detail>
    <xml data>112</xml data>
    <xml msg>its 112</xml msg>
    </xml detail>
    </xml header>

    I want to remove duplicates of <xml data> and publish the output. Ideally my output should look as below.

    <xml header>
    <xml detail>
    <xml data>111</xml data>
    <xml msg>its 111</xml msg>
    </xml detail>
    <xml detail>
    <xml data>112</xml data>
    <xml msg>its 112</xml msg>
    </xml detail>
    <xml detail>
    <xml data>114</xml data>
    <xml msg>its 114</xml msg>
    </xml detail>
    </xml header>

    Could you help me out what functions can help me out to achieve the same?

    -Thanks and Regards,Rajesekhar Potteti
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: Remove duplicates

    Posted Thu August 19, 2010 02:00 AM

    Originally posted by: vijji_WTX


    Hi Potteti,

    You can do this in 2 ways. One will be simply using Unique function at group level of XML DATA.It depends how small your file is. Second one will be first sort the XML_DATA values then u will get Unique values. You could see recent Thread on removing duplicates/getting Unique values. Oliver explained it clearly. Second one is suggested if inpur file is too large.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender