Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Count(*) operation in PIG


+
yogesh.kumar13@... 2012-07-26, 07:01
+
Alex Rovner 2012-07-26, 13:47
Copy link to this message
-
Re: Count(*) operation in PIG
answer = foreach (group AA by roll) generate group as roll,
COUNT_STAR(AA) as total;

Russell Jurney http://datasyndrome.com

On Jul 26, 2012, at 6:47 AM, Alex Rovner <[EMAIL PROTECTED]> wrote:

> What pig version are you using? I believe latest versions support COUNT(*)
>
> Sent from my iPhone
>
> On Jul 26, 2012, at 3:01 AM, <[EMAIL PROTECTED]> wrote:
>
>> Hi All,
>>
>> I having a structure
>> AA: {roll: bytearray, job: bytearray,name: bytearray}
>>
>> (12,yahoo,Yogesh)
>> (13,google,Mohit)
>> (14,L.K.G ,Aashi)
>> (15,School,Renu)
>> (16,tcs,Rajat)
>> (12,yahoo, Vishu)
>> (13,google, Yogesh)
>> (14,rediff, Mohit)
>> (15,wipro, Amit)
>> (16,tcs, Nikhil)
>>
>>
>>
>> I want to count the no: of repetition of roll, or on another repeated fields, like as we do in SQL select count(*) .
>>
>>
>> Please suggest me
>>
>> Thanks & Regards
>> Yogesh Kumar
>>
>>
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>>
>> www.wipro.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB