Automatic data type conversion - 6.3

Talend Open Studio for ESB User Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for ESB
task
Design and Development
EnrichPlatform
Talend Studio

When processing data flows using a tMap, if the input and output columns across a mapping are of different data types, compiling errors may occur at the Job execution time. The Enable Auto-Conversion of types option in the tMap helps avoid such errors.

You can activate the automatic conversion option at the project level so that any tMap component added afterwards in the project will have this feature enabled.

If needed, you can also define conversion rules to override the default conversion behavior of tMap.

  1. On the toolbar of the Studio main window, click or click File > Edit Project Properties from the menu bar to open the [Project Settings] dialog box.

  2. In the tree view of the dialog box, expand General and select Auto-Conversion of types to open the relevant view.

  3. Select the Enable Auto-Conversion of types check box to activate the automatic type conversion feature for all tMap components added afterwards in the project.

  4. If needed, click the [+] button to add a line, select the source and target data types, and define a Java function for data type conversion to create a conversion rule to override the default conversion behavior of tMap for data that matches the rule. Press Ctrl+Space to access a list of available Java functions.

    You can created as many conversion rules as you want.

  5. Click Apply to apply your changes and then OK to close the dialog box.

For more information about the automatic type conversion feature in tMap, see the tMap documentation of your Talend Open Studio Components Reference Guide.