pig tutorial - apache pig tutorial - Apache Pig - LOWER() - pig latin - apache pig - pig hadoop
What is LOWER() in pig?
- LOWER() function is used to convert all the characters in a string to lowercase.
Following is the syntax of the LOWER() function.
Assume that there is a file named wikitechy_emp.txt in the HDFS directory /pig_data/as shown below. This file contains the employee details such as id, name, age, and city.
And, we have loaded this file into Pig with a relation named wikitechy_emp_data as shown below.
Given below is an example of the LOWER() function. In this example, we have converted the names of all the employees to lowercase.
The above statement converts the names of all the employees to lowercase and returns the result.
The result of the statement will be stored in the relation named lower_data. Verify the content of the relation lower_data, using the Dump operator.