pig tutorial - apache pig tutorial - Apache Pig UPPER() - pig latin - apache pig - pig hadoop
What is UPPER() in pig?
- This function is used to convert all the characters in a string to uppercase.
- · The.upper() and.lower() string methods are self-explanatory. Performing the .upper() method on a string converts all of the characters to uppercase..
- The syntax of the UPPER() function is as follows −
- Assume that there is a file named wikitechy_emp.txt in the HDFS directory /pig_data/. 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 UPPER() function. In this example, we have converted the names of all the employees to upper case.
- The above statement converts the names of all the employees to uppercase and returns the result.
- The result of the statement will be stored in a relation named upper_data. Verify the content of the relation upper_data, using the Dump operator as shown below.