pig tutorial - apache pig tutorial - Apache Pig - FLOOR() - pig latin - apache pig - pig hadoop
What is FLOOR() function?
The floor function , also called the greatest integer function or integer value gives the largest integer less than or equal to.
Learn apache pig - apache pig tutorial - floor graph in apache pig - apache pig examples - apache pig programs
FLOOR() function in Apache Pig
- The FLOOR() function is used to calculate the value of an expression rounded down to the nearest integer
- Ensure that we have a file named wikitechy_floor.txt in the HDFS directory /pig_data/.
- This file contains integer and floating point values as shown below.
- We have loaded this file into Pig with a relation named floor_data as shown below.
- We can generate the floor values of the contents of the wikitechy_math.txt file using FLOOR() as given below.
- Now you can verify the contents of the relation using the Dump operator as given below.
The output shows that the result in the file>floor_data.