Difference between group and cogroup in Pig Latin

Group Cogroup
For readability GROUP is used
in statements involving one relation
Cogroup used as a statements involving two or more relations. Cogroup should no exceed 127 relations at a time.
The group statement collects together
records with the same key
cogroup is a general statement of group. Instead of collecting records of 1 input it collects records of N inputs based on a key
Syntax:
grunt> Group_data = GROUP Relation_name BY age;
Syntax:
alias = CROSS alias, alias [, alias …] [PARTITION BY partitioner] [PARALLEL n];

Categorized in:

Apache Pig

Tagged in:

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO