Javatpoint Logo
Javatpoint Logo

Apache Pig ABS Function

The Apache Pig ABS function is used to return the absolute value of an expression. If the result is negative, the negation of the result is returned.

Syntax

Example of ABS Function

In this example, we return the absolute value.

Steps to execute ABS Function

  • Create a text file in your local machine and insert the values.
Apache Pig ABS Function
  • Check the values inserted in the text files.
Apache Pig ABS 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 ABS Function
  • Let's return the absolute value.
Apache Pig ABS Function

Here, we got the desired output.

Next TopicCBRT 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