The Apache Pig SPLIT operator breaks the relation into at least two relations as per the given expression. Here, a tuple might possibly be relegated to at least one than one relation.
grunt> SPLIT Relation1_name INTO Relation2_name IF (condition1>
, Relation2_name (condition2>
,
1 aaa 74385738 delhi 21
2 bbb 76349948 mumbai 22
3 ddd 87493589 pune 23
4 ggg 74824727 goa 21
5 hhh 74843847 pune 22
6 uuu 76347242 delhi 24
7 lll 76485838 goa 26
SPLIT student_details into student_details1 if age<22, student_details2 if (23<age and age>25>
;
Output
1 aaa 74385738 delhi 21
4 ggg 74824727 goa 21
1 aaa 74385738 delhi 21
2 bbb 76349948 mumbai 22
4 ggg 74824727 goa 21
5 hhh 74843847 pune 22
7 lll 76485838 goa 26