Setting up a Pig User-Defined Function - 6.1

Talend Big Data Studio User Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
task
Design and Development
EnrichPlatform
Talend Studio

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.

  1. 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.

  2. 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.

  3. Complete the other fields in the wizard.

  4. Click Finish to validate the changes and the Pig UDF template is opened in the workspace.

  5. 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.