Template Module Development

This section describes the development of custom modules using the base Java module DsModTemplateSQL.

This base module allows transformations within a database (thus the T from ETL).

It uses the Apache FreeMarker Java template language to generate effective SQL from the input parameters, such as source SQL, source and target tables with their columns, as well as additional variables.

Documentation of the language can be found here: Apache FreeMarker

FreeMarker is configured so that all language tokens are specified with square brackets instead of angle brackets.

Without this configuration, the if-statement looks like this:

<#if condition>
  ...
<#elseif condition2>
  ...
...
<#else>
  ...
</#if>

With this configuration, the if-statement is written like this:

[#if condition]
  ...
[#elseif condition2]
  ...
...
[#else]
  ...
[/#if]