Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to show only duplicate records in the data model
how do we accomplish this??
Kindly help.
Try this
temp:
LOAD * Inline [
F1, F2
1, a
2, b
2, b
3, c
4, d
4, d
5, e
6, f
6, f
7, g
8, h
8, h
9, i
10, j
10, j
];
Right Join (temp)
LOAD F1,
F2
Where Count > 1;
LOAD F1,
F2,
Count(F1&F2) as Count
Resident temp
Group By F1, F2;
So are you looking to see all those F1 which repeat more than one? or are you looking for F1&F2 than repeat more than once?
Hi Antony,
Please check the attached file.
Hope it helps.
Yes Sunny am just taking dummy data to get the logic.
In my actual data it is completely different.
Can you suggest me on this??
But what is the final output you are looking to get?
Only it has to show duplicate records
In data model table should be like this
Hi Antony,
Did you check my attachment?
Try this
temp:
LOAD * Inline [
F1, F2
1, a
2, b
2, b
3, c
4, d
4, d
5, e
6, f
6, f
7, g
8, h
8, h
9, i
10, j
10, j
];
Right Join (temp)
LOAD F1,
F2
Where Count > 1;
LOAD F1,
F2,
Count(F1&F2) as Count
Resident temp
Group By F1, F2;
No am unable to open that you've shared as am using PE
temp:
LOAD* Inline
[
F1, F2
1, a
2, b
2, b
3, c
4, d
4, d
5, e
6, f
6, f
7, g
8, h
8, h
9, i
10, j
10, j
];
Temp1:
NoConcatenate
Load
*
where Count >1;
Load
F1,F2,
count(F1&F2) as Count
Resident
temp
group by
F1,F2;
drop Table temp;