The difference between GROUP and COGROUP operators in Pig?
Answer Posted / Sudhanshu Shekhar
In Pig, the GROUP operator groups tuples based on a specified field or set of fields. The resulting output is a Bag for each group key, containing all the original tuples that belong to the respective group. On the other hand, COGROUP operates on multiple relations and groups them together using the same grouping expressions. It returns a relation where the bag of one data stream is associated with the bags of other data streams based on common grouping fields.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers