Javatpoint Logo
Javatpoint Logo

Apache Pig CONCAT Function

The Apache Pig CONCAT function is used to concatenate two or more expressions. The generated result of expression must have identical types. However, if any sub-expression is null, the generated expression is also null.

Example of CONCAT Function

In this example, we concatenate the first two fields of each tuple.

Steps to execute CONCAT Function

  • Create a text file in your local machine and insert the list of tuples.
Apache Pig CONCAT Function
  • Check the tuples inserted in the text files.
Apache Pig CONCAT Function
  • Upload the text files on HDFS in the specific directory.
  • Open the pig MapReduce run mode.
  • Load the file that contains the data.
  • Now, execute and verify the data.
Apache Pig CONCAT Function
  • Let's return the concatenation of two fields of each tuple.
Apache Pig CONCAT Function

Here, we got the desired output.

Next TopicCOUNT Function





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA