You create the Velocity template on the Velocity tab. To create the template, enter or paste the template in the template editor. Then click Validate to validate the syntax.
The following image shows the template editor:
The template can contain VTL statements, Data Integration built-in functions, and Data Integration unconnected lookup expressions. For more information about the Velocity Template Language, see the Apache Velocity documentation.
To call a built-in function, use the following syntax:
The following function call passes the property $vendor.name as an argument to the INITCAP function to capitalize the first letter of each word in the vendor name:
$function.call('InitCap',$vendor.name)
Tip: You can select a function in the Built-in Functions list to copy the function call syntax into the template at the cursor position.
To call an unconnected lookup, use the following syntax:
For example, the following expression passes the properties $item.id and $item.category as arguments to an unconnected lookup Transformation named lkp_ItemPrices:
To validate the syntax, click Validate. Data Integration checks the template and displays any syntax errors. If the template syntax is invalid, you can save the mapping but the mapping is invalid.
Validation does not test the template output or find runtime errors. You can test the template output on the Test tab.