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:

Tagged in:

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