184
Apache Pig ROUND Function
The Apache Pig ROUND function is used to round up the provided value to an integer. If the return type is float, the value rounded to an integer. However, if the return type is double, the value rounded to a long.
Syntax
Example of ROUND Function
In this example, we return the round up value of the given expression.
Steps to execute ROUND 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 round up value.
Here, we got the desired output.
Next TopicSQRT Function