Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. Aggregator transformation
  7. B2B transformation
  8. Chunking transformation
  9. Cleanse transformation
  10. Data Masking transformation
  11. Data Services transformation
  12. Deduplicate transformation
  13. Expression transformation
  14. Filter transformation
  15. Hierarchy Builder transformation
  16. Hierarchy Parser transformation
  17. Hierarchy Processor transformation
  18. Input transformation
  19. Java transformation
  20. Java transformation API reference
  21. Joiner transformation
  22. Labeler transformation
  23. Lookup transformation
  24. Machine Learning transformation
  25. Mapplet transformation
  26. Normalizer transformation
  27. Output transformation
  28. Parse transformation
  29. Python transformation
  30. Rank transformation
  31. Router transformation
  32. Rule Specification transformation
  33. Sequence transformation
  34. Sorter transformation
  35. SQL transformation
  36. Structure Parser transformation
  37. Transaction Control transformation
  38. Union transformation
  39. Vector Embedding transformation
  40. Velocity transformation
  41. Verifier transformation
  42. Web Services transformation

Transformations

Transformations

Velocity template

Velocity template

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 Velocity Template tab contains a list of built-in functions on the left and the template editor on the right.
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:
$function.call('<function name>',<argument>,<argument>,...)
For example, the following template code returns the system time stamp in an XML comment:
<!--Generation date: $function.call('Systimestamp')-->
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)
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:
$function.call(':LKP.<Lookup transformation name>)',<argument>,<argument>,...)
For example, the following expression passes the properties $item.id and $item.category as arguments to an unconnected lookup Transformation named lkp_ItemPrices:
$function.call(':LKP.lkp_ItemPrices',$item.id,$item.category)
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.

0 COMMENTS

We’d like to hear from you!