Apache Pig FOREACH Operator
The Apache Pig FOREACH operator generates data transformations based on columns of data. It is recommended to use FILTER operation to work with tuples of data.
Example of FOREACH Operator
In this example, we traverse the data of two columns exists in the given file.
Steps to execute FOREACH Operator
Here, we got the desired output.