pig tutorial - apache pig tutorial - Apache Pig LCFIRST() - pig latin - apache pig - pig hadoop
What is LCFIRST?
- This function is used to covert the first character of the given string into lowercase.
Syntax:
- Following is the syntax of the LCFIRST() function.
Example:
- 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.
wikitechy_emp.txt
- 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 LCFIRST() function. In this example, we have converted all the first letters of the names of the employees to lowercase.
- The result of the statement will be stored in the relation named Lcfirst_data. Verify the content of the relation Lcfirst_data, using the Dump operator as shown below.