Thursday, April 30, 2015

Difference between tJava,tJavaRow and tJavaFlex component

There are three Java components in the Custom Code family: tJava, tJavaRow and tJavaFlex

  1. tJava
  • tJava component is used to integrate your custom Java code into a Talend program. 
  • It applies exclusively to the start part of the generated code of the subjob. 
  • It will be executed first but only once in the subjob. 
  • tJava component has no input or output data flow and is used as a separate subjob.  
  • Common use of tJava include setting global or context variables prior to the main data processing stages and printing logging messages.It is udes to display status message and variables.
    
     2.  tJavaRow
  • The tJavaRow code applies exclusively to the main part of the generated code of the subjob. 
  • The Java code inserted through the tJavaRow will be executed for each row. 
  • The tJavaRow component is used as an intermediate component and you are able to access the input flow and transform the data.

     3.  tJavaFlex  

The tJavaFlex has three Java code parts (start, main, end) that enable you to enter personalized code for different purposes. 
  • The Start code is executed prior to any rows being processed, so it is used to initialize the variables.The start part will be executed first but only once in the subjob. 
  • The Main code is executed for every row. You are able to access the input flow and modify the data. The source data is processed at runtime by the tJavaFlex
  • The End code is executed after all the rows have finished processing but only once in a job.


The tJavaFlex component is similar to the tJavaRow component, in that it is included into a flow. The difference between the two components is that the tJavaFlex component has pre and post processes that are performed before and after the individual rows are processed.

No comments:

Post a Comment