Javatpoint Logo
Javatpoint Logo

Apache Pig SQRT Function

The Apache Pig SQRT function is used to find out the square root of the given value. It always returns the positive square root of an expression.

Syntax

Example of SQRT Function

In this example, we return the square root of the given value.

Steps to execute SQRT Function

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

Here, we got the desired output.

Next Topic#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA