on 03-16-2008 2:37 AM
Hi, Need a code to remove Duplicate records in java .
Praveen,
Could u give an example? You can do it in Graphical Mapping!
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Praveen,
Duplicate records and the example which u said is totally contradicting! Are u looking for something like below
Source
<Records>
<Row>
<ID>10001</ID>
<Name>Praveen</Name>
</Row>
<Row>
<ID>11901</ID>
<Name>Raj</Name>
</Row>
<Row>
<ID>10001</ID>
<Name>Praveen</Name>
</Row>
</Records>
Target
<Records>
<Row>
<ID>10001</ID>
<Name>Praveen</Name>
</Row>
<Row>
<ID>11901</ID>
<Name>Raj</Name>
</Row>
</Records>
Since ID 10001 Duplicated twice, you need to remove one! Is my understanding correct, regarding ur reqmt?
raj.
Dear Praveen,
Try the below logic and let me know if it helps!
Records -----> Records
ID[Change Context]------>Sort[Choose Numerical,Ascending]------> SplitByValue[Value Change]-----> Collapse Context--------->Row
*To Populate, Target ID Field*
ID[Change Context]------>Sort[Choose Numerical,Ascending]------> SplitByValue[Value Change]-----> Collapse Context--------->SplitByValue[Each Value]----->ID
*To Populate, Target Name Field*
ID[Change Context]------>Sort[Choose Numerical,Ascending]------> SplitByValue[Value Change]-----> 1
ID[Change Context] & Name[Change Context]------>Sort By Key[Choose Numerical,Ascending]------> 2
1 & 2 -------->Format By Example ---------->CollapseContext----------->SplitByValue[Each Value]-------->Name
In the second logic, while populating Name field,
Format ByExample expects two input . In the above logic consider 1 & 2 as continuation. Hence Format By Example first input must be 1(ie continutation) and the second input must be 2(ie continuation).
If you think it's confusing, then let me know.
raj.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.