Creating a user routine - 6.4

Standard

author
Talend Documentation Team
EnrichVersion
6.4
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Design and Development > Designing Jobs > Job Frameworks > Standard
EnrichPlatform
Talend Studio

Procedure

  1. In Repository, click the Code node, then Routines, then right-click on Routines and select the Create routine option to create a user routine.
  2. In the pop-up window, enter a routine name in the Name field (this example uses MyRoutineDemo). Then click Finish.
  3. By default an example function called helloExample is provided whenever a new user routine is created, as follows:
    Note: The function annotates are optional, but if you want the function to be displayed in a category so that the function can be chosen from the category when editing the code expression, as the below figure showed, you have to specify the {Category} property.
  4. Create a new function called reverseString that is used to reverse a string.
    Note: If you need to use external JARs in the function, right-click on the routine name in Repository and select the Edit Routine Libraries option to add external JARs.