111
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.
- Check the values inserted in the text files.
- 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.
- Let’s return the absolute value.
Here, we got the desired output.
Next TopicCBRT Function