Introduction

datasqill template modules have the advantage that no programming knowledge is required for creation, only an understanding of the FreeMarker template language.

With a template module, recurring systems can be stored and the datasqill developer can focus on the business query.

A typical and simple template module is Insert(T). It generates the effective SQL with the insert into the target table from the knowledge of the target table in the datasqill model and the query. As can be read, the supplied module enables additional functionality that is not considered in this introduction.

Query in the datasqill transformation:

SELECT vertrag_datum.id
     , vertrag_datum.datum
     , vertrag_zeit.uhrzeit
  FROM vertrag_datum
     , vertrag_zeit
 WHERE vertrag_datum.id = vertrag_zeit.id

Generated SQL by the Template Module Insert(T)

INSERT INTO SOFTQUADRAT.vertrag_datum_zeit (
       id
     , datum
     , uhrzeit
     )
SELECT id
     , datum
     , uhrzeit
  FROM (
SELECT vertrag_datum.id
     , vertrag_datum.datum
     , vertrag_zeit.uhrzeit
  FROM vertrag_datum
     , vertrag_zeit
 WHERE vertrag_datum.id = vertrag_zeit.id
       ) src

Thus the developer only needs to formulate the query and the template module takes care of the rest.