<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Qlik Talend Data Integration: What is the difference between tJava, tJavaRow, and tJavaFlex? in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-What-is-the-difference-between/ta-p/2151892</link>
    <description>&lt;P&gt;There are three Java components in the &lt;STRONG&gt;Custom Code&lt;/STRONG&gt; family: &lt;STRONG&gt;tJava&lt;/STRONG&gt;, &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;, and &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;. These Java components allow you to integrate custom Java code in a Talend program. This article explains the difference between these three components, and explains how to use them in a Job.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;This article was written with:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Talend Open Studio for Data Integration 5.3.1-r72978&lt;/LI&gt;
&lt;LI&gt;JDK version: Sun JDK build 1.6.0_26-b03&lt;/LI&gt;
&lt;LI&gt;Operating system: Windows XP SP3&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This article applies to all versions of Talend Studio.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJava&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;You can use a &lt;STRONG&gt;tJava&lt;/STRONG&gt; component to integrate your custom Java code into a Talend program. It applies exclusively to the start of the generated code of the subjob: it will be executed first, but only once in the subjob. Normally, &lt;STRONG&gt;tJava&lt;/STRONG&gt; has no input or output data flow and is used as a separate subjob.&lt;/P&gt;
&lt;P&gt;The following example shows how you can use a &lt;STRONG&gt;tJava&lt;/STRONG&gt; component:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;passes the data to a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; and prints it in the console,&lt;/LI&gt;
&lt;LI&gt;then the &lt;STRONG&gt; tJava&lt;/STRONG&gt; component retrieves the total number of records processed through the Job using a global variable and prints this number in the console.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAmKAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124885iD5AD03289CA1CA07/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAmKAAU.png" alt="0693p000008uAmKAAU.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The source data file read by &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; includes the following data:&lt;/P&gt;
&lt;PRE&gt;1;Shong
2;Elisa
3;Sabrina&lt;/PRE&gt;
&lt;P&gt;Some Java code should then be inserted in the &lt;STRONG&gt;tJava_1&lt;/STRONG&gt; component in order to obtain the number of records being processed:&lt;/P&gt;
&lt;PRE&gt;int nb_line=(Integer)globalMap.get("tFileInputDelimited_1_NB_LINE");
System.out.println("The total number of records are read from the text file is: " +nb_line);&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 15:42 22/09/2013.
 
[statistics] connecting to socket on port 3589
[statistics] connected
1|Shong
2|Elisa
3|Sabrina
The total number of records are read from the text file is: 3
[statistics] disconnected
Job aaa ended at 15:42 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;The actual records from the input file are printed into the console natively. In addition, due to the use of the &lt;STRONG&gt;tJava &lt;/STRONG&gt;component, the number of records also displays on the console.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; code applies exclusively to the main part of the generated code of the subjob. The Java code inserted through the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; will be executed for each row. Generally, the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component is used as an intermediate component and you are able to access the input flow and transform the data.&lt;/P&gt;
&lt;P&gt;The following use case shows a typical Job using a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component applies some transformation to the data being processed,&lt;/LI&gt;
&lt;LI&gt;then the transformed data is displayed to the console using a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; component.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAf4AAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123545i667D5490AA6B0E05/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAf4AAE.png" alt="0693p000008uAf4AAE.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; reads the same text file as in the &lt;STRONG&gt;tJava&lt;/STRONG&gt; example.&lt;/P&gt;
&lt;P&gt;The following Java code needs to be inserted in the &lt;STRONG&gt;tJavaRow_1&lt;/STRONG&gt; component to transform the data. In this use case, it converts the column names to upper case.&lt;/P&gt;
&lt;PRE&gt;output_row.id = input_row.id;
output_row.name = (input_row.name).toUpperCase();&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 16:27 22/09/2013.
 
[statistics] connecting to socket on port 3393
[statistics] connected
1|SHONG
2|ELISA
3|SABRINA
[statistics] disconnected
Job aaa ended at 16:27 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;This example shows that it is possible to access the input flow using a dedicated variable and following a specific syntax, such as: &lt;STRONG&gt;input_row.name&lt;/STRONG&gt;. The source data is processed at runtime by the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; component has three Java code parts (start, main, end) that enable you to enter personalized code for different purposes. The start part will be executed first, but only once in the subjob. The main part will be executed for each row. You are able to access the input flow and modify the data. The source data is processed at runtime by &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;. The end part will be executed at the end of the subjob, but only once.&lt;/P&gt;
&lt;P&gt;The following is a simple use case using &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component injects specific code at various moment of the Job processing (start, main, or end parts),&lt;/LI&gt;
&lt;LI&gt;then the data is displayed to the console using a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; component, in addition to other processing information based on what the code injection says in the start and/or end part of &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAzKAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123608i52D413B2C92F6767/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAzKAAU.png" alt="0693p000008uAzKAAU.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; still reads the same text file as in the &lt;STRONG&gt;tJava&lt;/STRONG&gt; and &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;examples.&lt;/P&gt;
&lt;P&gt;The following Java code needs to be inserted in the three Java-code parts of &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;:&lt;/P&gt;
&lt;H5&gt;Start code:&lt;/H5&gt;
&lt;PRE&gt;System.out.println("******The subjob begins to work!******");
int nb_line=0;&lt;/PRE&gt;
&lt;H5&gt;Main code:&lt;/H5&gt;
&lt;PRE&gt;row2.name=(row1.name).toUpperCase();
nb_line++;&lt;/PRE&gt;
&lt;P&gt;End code:&lt;/P&gt;
&lt;PRE&gt;System.out.println("The total number of processed data is: "+nb_line);
System.out.println("******The subjob finishes!******");&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 16:47 22/09/2013.
 
[statistics] connecting to socket on port 3641
[statistics] connected
******The subjob begins to work!******
1|SHONG
2|ELISA
3|SABRINA
The total number of processed data is: 3
******The subjob finishes!******
[statistics] disconnected
Job aaa ended at 16:47 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;Basically &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; is a combination of &lt;STRONG&gt;tJava&lt;/STRONG&gt; and &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;, mixing injection of code on a one-shot basis at the start/end of a Job with real data transformations for each row.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Through the examples above, you notice that &lt;STRONG&gt;tJava&lt;/STRONG&gt; is used to execute a piece of Java code as a separate subjob in most cases. The Java code will be executed only once, whereas the Java code of the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; will be executed for each row. &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; is normally used as an intermediary component: you are able to access and transform the input data flow. If you want to do some initialization operations at the beginning of subjob or other processing operations at the end of subjob, the &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; is the best component to use.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Dec 2025 06:08:25 GMT</pubDate>
    <dc:creator>TalendSolutionExpert</dc:creator>
    <dc:date>2025-12-26T06:08:25Z</dc:date>
    <item>
      <title>Qlik Talend Data Integration: What is the difference between tJava, tJavaRow, and tJavaFlex?</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-What-is-the-difference-between/ta-p/2151892</link>
      <description>&lt;P&gt;There are three Java components in the &lt;STRONG&gt;Custom Code&lt;/STRONG&gt; family: &lt;STRONG&gt;tJava&lt;/STRONG&gt;, &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;, and &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;. These Java components allow you to integrate custom Java code in a Talend program. This article explains the difference between these three components, and explains how to use them in a Job.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;This article was written with:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Talend Open Studio for Data Integration 5.3.1-r72978&lt;/LI&gt;
&lt;LI&gt;JDK version: Sun JDK build 1.6.0_26-b03&lt;/LI&gt;
&lt;LI&gt;Operating system: Windows XP SP3&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This article applies to all versions of Talend Studio.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJava&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;You can use a &lt;STRONG&gt;tJava&lt;/STRONG&gt; component to integrate your custom Java code into a Talend program. It applies exclusively to the start of the generated code of the subjob: it will be executed first, but only once in the subjob. Normally, &lt;STRONG&gt;tJava&lt;/STRONG&gt; has no input or output data flow and is used as a separate subjob.&lt;/P&gt;
&lt;P&gt;The following example shows how you can use a &lt;STRONG&gt;tJava&lt;/STRONG&gt; component:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;passes the data to a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; and prints it in the console,&lt;/LI&gt;
&lt;LI&gt;then the &lt;STRONG&gt; tJava&lt;/STRONG&gt; component retrieves the total number of records processed through the Job using a global variable and prints this number in the console.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAmKAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124885iD5AD03289CA1CA07/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAmKAAU.png" alt="0693p000008uAmKAAU.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The source data file read by &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; includes the following data:&lt;/P&gt;
&lt;PRE&gt;1;Shong
2;Elisa
3;Sabrina&lt;/PRE&gt;
&lt;P&gt;Some Java code should then be inserted in the &lt;STRONG&gt;tJava_1&lt;/STRONG&gt; component in order to obtain the number of records being processed:&lt;/P&gt;
&lt;PRE&gt;int nb_line=(Integer)globalMap.get("tFileInputDelimited_1_NB_LINE");
System.out.println("The total number of records are read from the text file is: " +nb_line);&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 15:42 22/09/2013.
 
[statistics] connecting to socket on port 3589
[statistics] connected
1|Shong
2|Elisa
3|Sabrina
The total number of records are read from the text file is: 3
[statistics] disconnected
Job aaa ended at 15:42 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;The actual records from the input file are printed into the console natively. In addition, due to the use of the &lt;STRONG&gt;tJava &lt;/STRONG&gt;component, the number of records also displays on the console.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; code applies exclusively to the main part of the generated code of the subjob. The Java code inserted through the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; will be executed for each row. Generally, the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component is used as an intermediate component and you are able to access the input flow and transform the data.&lt;/P&gt;
&lt;P&gt;The following use case shows a typical Job using a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component applies some transformation to the data being processed,&lt;/LI&gt;
&lt;LI&gt;then the transformed data is displayed to the console using a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; component.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAf4AAE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123545i667D5490AA6B0E05/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAf4AAE.png" alt="0693p000008uAf4AAE.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; reads the same text file as in the &lt;STRONG&gt;tJava&lt;/STRONG&gt; example.&lt;/P&gt;
&lt;P&gt;The following Java code needs to be inserted in the &lt;STRONG&gt;tJavaRow_1&lt;/STRONG&gt; component to transform the data. In this use case, it converts the column names to upper case.&lt;/P&gt;
&lt;PRE&gt;output_row.id = input_row.id;
output_row.name = (input_row.name).toUpperCase();&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 16:27 22/09/2013.
 
[statistics] connecting to socket on port 3393
[statistics] connected
1|SHONG
2|ELISA
3|SABRINA
[statistics] disconnected
Job aaa ended at 16:27 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;This example shows that it is possible to access the input flow using a dedicated variable and following a specific syntax, such as: &lt;STRONG&gt;input_row.name&lt;/STRONG&gt;. The source data is processed at runtime by the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component.&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; component has three Java code parts (start, main, end) that enable you to enter personalized code for different purposes. The start part will be executed first, but only once in the subjob. The main part will be executed for each row. You are able to access the input flow and modify the data. The source data is processed at runtime by &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;. The end part will be executed at the end of the subjob, but only once.&lt;/P&gt;
&lt;P&gt;The following is a simple use case using &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;A &lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt; component reads data from a text file,&lt;/LI&gt;
&lt;LI&gt;a &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; component injects specific code at various moment of the Job processing (start, main, or end parts),&lt;/LI&gt;
&lt;LI&gt;then the data is displayed to the console using a &lt;STRONG&gt;tLogRow&lt;/STRONG&gt; component, in addition to other processing information based on what the code injection says in the start and/or end part of &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0693p000008uAzKAAU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123608i52D413B2C92F6767/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000008uAzKAAU.png" alt="0693p000008uAzKAAU.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;tFileInputDelimited_1&lt;/STRONG&gt; still reads the same text file as in the &lt;STRONG&gt;tJava&lt;/STRONG&gt; and &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;examples.&lt;/P&gt;
&lt;P&gt;The following Java code needs to be inserted in the three Java-code parts of &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt;:&lt;/P&gt;
&lt;H5&gt;Start code:&lt;/H5&gt;
&lt;PRE&gt;System.out.println("******The subjob begins to work!******");
int nb_line=0;&lt;/PRE&gt;
&lt;H5&gt;Main code:&lt;/H5&gt;
&lt;PRE&gt;row2.name=(row1.name).toUpperCase();
nb_line++;&lt;/PRE&gt;
&lt;P&gt;End code:&lt;/P&gt;
&lt;PRE&gt;System.out.println("The total number of processed data is: "+nb_line);
System.out.println("******The subjob finishes!******");&lt;/PRE&gt;
&lt;P&gt;Execute the Job by pressing &lt;STRONG&gt;F6&lt;/STRONG&gt;. You can see the following results in the console:&lt;/P&gt;
&lt;PRE&gt;Starting job aaa at 16:47 22/09/2013.
 
[statistics] connecting to socket on port 3641
[statistics] connected
******The subjob begins to work!******
1|SHONG
2|ELISA
3|SABRINA
The total number of processed data is: 3
******The subjob finishes!******
[statistics] disconnected
Job aaa ended at 16:47 22/09/2013. [exit code=0]&lt;/PRE&gt;
&lt;P&gt;Basically &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; is a combination of &lt;STRONG&gt;tJava&lt;/STRONG&gt; and &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;, mixing injection of code on a one-shot basis at the start/end of a Job with real data transformations for each row.&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P&gt;Through the examples above, you notice that &lt;STRONG&gt;tJava&lt;/STRONG&gt; is used to execute a piece of Java code as a separate subjob in most cases. The Java code will be executed only once, whereas the Java code of the &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; will be executed for each row. &lt;STRONG&gt;tJavaRow&lt;/STRONG&gt; is normally used as an intermediary component: you are able to access and transform the input data flow. If you want to do some initialization operations at the beginning of subjob or other processing operations at the end of subjob, the &lt;STRONG&gt;tJavaFlex&lt;/STRONG&gt; is the best component to use.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Dec 2025 06:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-What-is-the-difference-between/ta-p/2151892</guid>
      <dc:creator>TalendSolutionExpert</dc:creator>
      <dc:date>2025-12-26T06:08:25Z</dc:date>
    </item>
  </channel>
</rss>

