on 07-07-2009 7:40 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sweta,
Thanks so much for your reply but this didnu2019t work! I am getting the target response as
<List>
<ParentNode>
<Child1>PK1</Child1>
<Child2>SomeValue1</Child2>
</ParentNode>
<ParentNode></ParentNode>
<ParentNode></ParentNode>
</List>
I don't want the second <ParentNode> and want value for the third <ParentNode> one as there is a value change! Did I miss anything!
Thanks
Hi,
Please note that in my reply I asked you to map ParentNode with <Child1> Please see the below.
<Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext---<ParentNode>
Secondly: introduce split by value(for each value ) after collapse context for child1 and child2. as shown below.
<Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child1>
<Child2>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child2>
it will surely work,
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.