Skip to Content
avatar image
Former Member

Help required on mapping to remove duplicate entries

Hi all experts,

I need some help in mapping. I am new to this tool. How would I remove duplicate entries in source payload? My structure is as follows

Message Structure

<List> 1-1

<ParentNode> 0-unbounded

<Child1> 0-1

<Child2> 0-1

Source:

<List>

<ParentNode>

<Child1>PK1</Child1>

<Child2>SomeValue1</Child2>

</ParentNode>

<ParentNode>

<Child1>PK1</Child1>

<Child2>SomeValue1</Child2>

</ParentNode>

<ParentNode>

<Child1>PK2</Child1>

<Child2>SomeValue2</Child2>

</ParentNode>

</List>

Target I would like:

<List>

<ParentNode>

<Child1>PK1</Child1>

<Child2>SomeValue1</Child2>

</ParentNode>

<ParentNode>

<Child1>PK2</Child1>

<Child2>SomeValue2</Child2>

</ParentNode>

</List>

Any help?

Thanks so much all

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 07, 2009 at 07:02 AM

    Hi,

    Please try this:

    <Child1>-- >RemoveContext Node function >Split by Value(set the property as on value change) ->CollapseContext ---<ParentNode>

    <Child1>-- >RemoveContext Node function >Split by Value(set the property as on value change) ->CollapseContext </Child1>

    <Child2>-- >RemoveContext Node function >Split by Value(set the property as on value change) ->CollapseContext </Child2>

    Regards,

    Shweta.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 06:52 AM

    there is a standard function SplitByValue(Keep option as Value Change)....this will help you in passing only one of the many duplicate values.....just make a search on SDN with SpliByValue....if i remember there is even one blog which shows the functionality....

    Regards,

    Abhishek.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 08:52 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded