Pig UDF (User Defined Functions)To specify custom processing, Pig provides support for user-defined functions (UDFs). Thus, Pig allows us to create our own functions. Currently, Pig UDFs can be implemented using the following programming languages: -
Among all the languages, Pig provides the most extensive support for Java functions. However, limited support is provided to languages like Python, Jython, JavaScript, Ruby, and Groovy. Example of Pig UDFIn Pig,
Let's see an example of a simple EVAL Function to convert the provided string to uppercase. UPPER.java
Here, we got the desired output.
Next TopicLOAD Operator
|