[Solved-1 Solution] Pig Conditional Operators ?
What is foreach
- The FOREACH operator is used to generate specified data transformations based on the column data.
- Given below is the syntax of FOREACH operator.
Consider the below relation
Is there a way to achieve the following Consider the below relation
- We can do a FOREACH and use the ternary operator as follows.