Maybe use FILTER(): http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#FILTER
William F Dowling Senior Technologist Thomson Reuters -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Wednesday, September 19, 2012 4:26 PM To: [email protected] Subject: How Select the top records Importance: High Hi all, I have run the script. and dump it . 1.) Bcount = foreach Bgroup generate group, COUNT(Btop) as number ; 2.) Border = order Bcount by number desc; 3.) Dump Border ; and the its Output is like. (10.100.195.16,48) (208.82.124.93,31) (210.172.234.116,9) (192.223.163.5,6) (108.28.16.81,4) (125.16.95.11,4) (202.46.23.55,4) (203.129.242.34,4) (115.112.233.75,4) (204.4.131.140,3) (134.159.168.105,3) (70.178.1.235,3) (31.178.7.2,2) (67.195.111.170,2) (209.85.224.91,1) (66.249.72.105,1) (68.225.229.67,1) Now I want the records whose count(Btop) as number is greater than 3. {(last coloum of each row )like here number are in desending order 49, 31, 9, 6, 4, 4, 4, 3 ... etc } How to get these records. Please suggest Thanks & regards Yogesh Kumar
