Search code examples
apache-camelintegrationtalendtmap

Talend: Is there a way to edit the configuration of the tMap component via text editor?


I recently started to use Talend Studio and I find that using the tMap component can be tiresome because of the need to select every row then click on evaluation then edit the expression. This would be much faster if I had access to the file where this is defined. Does such a file exist?


Solution

  • For TOS for Data Integration, this is how it works. It may be the same in the TOS product you are using.

    I think editing the job's XML is going to be complex and prone to error. A single XML file represents the visual layout of all the components, their wiring, and their configuration. When you build a job, it interprets all of that and creates a single java class. Additionally, tMap expressions must consist of a single Java expression and it is often hard to read because of the small window allocated to the editor.

    Rather than keeping lots of expressions in a single tMap, I recommend performing row-based operations on specific fields within a tJavaRow (or tGroovyRow). Within a tJavaRow (or tGroovyRow), you get much more visible space for code and you can use any number of Java statements for calculations on a single field/column.