As explained in the section earlier, you can create a Pig User-Defined Function (Pig UDF) and it is automatically added to the Category list in the Expression Builder view.
Right-click the Pig UDF sub-node under the Code node of the Repository tree and from the contextual menu, select Create Pig UDF.
The [Create New Pig UDF] wizard is displayed.
From the Template list, select the type of the Pig UDF function to be created. Based on your choice, the Studio will provide the corresponding template to help the development of the Pig UDF you need.
Complete the other fields in the wizard.
Click Finish to validate the changes and the Pig UDF template is opened in the workspace.
Write your code in the template.
Once done, this Pig UDF will automatically appear in the Categories list in the Expression Builder view of tPigMap and is ready for use.