Home | Table of Contents | Internal or External Definition | CloverETL 4.6.1
--- | --- | ---
Prev | Defining Transformations | Next

### Internal or External Definition

Each transformation can be defined as internal or external:

- Internal transformation:

  An attribute like Transform, Denormalize, etc. must be defined.

  In such a case, the piece of code is written directly in the graph and can be seen in it.

- External transformation:

  One of the following two kinds of attributes may be defined:

  - Transform URL, Denormalize URL, etc., for both Java and CTL

    The code is written in an external file. Also charset of such external file can be specified (Transform source charset, Denormalize source charset, etc.).

    For transformations written in Java, folder with transformation source code need to be specified as source for Java compiler so that the transformation may be executed successfully.

  - Transform class, Denormalize class, etc.

    It is a compiled Java class.

    The class must be in classpath so that the transformation may be executed successfully.

Here we provide a brief overview:

- Transform, Denormalize, etc.

  To define a transformation in the graph itself, you must use the Transform editor (or the Edit value dialog in case of JMSReader, and JMSWriter components). In them you can define a transformation located and visible in the graph itself. The languages which can be used for writing transformation have been mentioned above (Java or CTL).

  For more detailed information about the editor or the dialog see Transform Editor or Edit Value Dialog.

- Transform URL, Denormalize URL, etc.

  You can also use a transformation defined in some source file outside the graph. To locate the transformation source file, use the URL File Dialog. Each of the mentioned components can use this transformation definition. This file must contain the definition of the transformation written in either Java or CTL. In this case, transformation is located outside the graph.

  For more detailed information see URL File Dialog.

- Transform class, Denormalize class, etc.

  In all transforming components, you can use some compiled transformation class. To do that, use the Open Type wizard. In this case, transformation is located outside the graph.

  See Open Type Dialog for more detailed information.

More details about how you should define the transformations can be found in the sections concerning corresponding components. Both transformation functions (required and optional) of CTL templates and Java interfaces are described there.

Here we present a brief table with an overview of transformation-allowing components:

Table 40.1. Transformations Overview

Component | Transformation required | Java | CTL | Each to all outputs [1] | Different to different outputs [2] | CTL template | Java interface
--- | --- | --- | --- | --- | --- | --- | ---
Readers
DataGenerator |  |  |  |  |  | CTL Templates for DataGenerator | Java Interface
JMSReader |  |  |  |  |  | - | Java Interfaces for JMSReader
MultiLevelReader |  |  |  |  |  | - | Java Interfaces for MultiLevelReader
Writers
JMSWriter |  |  |  | - | - | - | Java Interfaces for JMSWriter
Transformers
Partition |  |  |  |  |  | CTL Templates for Partition (or ParallelPartition) | Java Interface
DataIntersection |  |  |  | - | - | CTL Templates for DataIntersection | Java Interfaces for DataIntersection
Reformat |  |  |  |  |  | CTL Templates for Reformat | Java Interfaces for Reformat
Denormalizer |  |  |  | - | - | CTL Templates | Java Interface
Normalizer |  |  |  | - | - | CTL Templates for Normalizer | Java Interface
Rollup |  |  |  |  |  | CTL Templates for Rollup | Java Interface
DataSampler |  |  |  | - | - | - | -
Joiners
ExtHashJoin |  |  |  | - | - | CTL Templates for Joiners | Java Interfaces for Joiners
ExtMergeJoin |  |  |  | - | - | CTL Templates for Joiners | Java Interfaces for Joiners
LookupJoin |  |  |  | - | - | CTL Templates for Joiners | Java Interfaces for Joiners
DBJoin |  |  |  | - | - | CTL Templates for Joiners | Java Interfaces for Joiners
RelationalJoin |  |  |  | - | - | CTL Templates for Joiners | Java Interfaces for Joiners
Cluster Components
ParallelPartition |  |  |  |  |  | - | -
[1] If this is `yes`, each data record is always sent out through all connected output ports. [2] If this is `yes`, each data record can be sent out through the connected output port whose number is returned by the transformation. See Return Values of Transformations for more information.

Prev | Up | Next
Java or CTL | Home | Table of Contents | Return Values of Transformations