<?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>topic Re: [resolved] Use Multiple outputs with tJavaRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349216#M116221</link>
    <description>All of your logic can be contained with a tMap. Take a look at the link I posted n my last post. That will show you how you can push your data in different directions with a tMap. With regard to your complex logic, you can write routines (Java classes with static methods) which can be called inside the tMaps. You have the concept of tMap variables which are processed from top to bottom and hold their values between rows (very important and useful to remember). You can use these to call your routine methods.&amp;nbsp;</description>
    <pubDate>Thu, 23 Mar 2017 17:57:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-23T17:57:50Z</dc:date>
    <item>
      <title>[resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349211#M116216</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I am trying to get the data from a flat file (in this case there are no delimiters, they are fixed rows), for example:&lt;BR /&gt;&lt;BR /&gt;DATEVALUEDESCRIPTION&lt;BR /&gt;2017020320000EFFECTIVEPAY&lt;BR /&gt;&lt;BR /&gt;In a tJavaRow I am applying some validations of structure and depending on the result, I want to send the data to insert it into an ORACLE database. So, for example, I validate that the text "20170203" is a valid date and if it is a valid date I want to send it by an output X to store it with an prepared statement in some table, but if it is not a valid date then I want to send it by another Output to perform an insert with another component in a different table that will log the errors. However, I can not find the way to specify more than one output with the componet.&lt;BR /&gt;&lt;BR /&gt;Could anyone help me, please?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 01:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349211#M116216</guid>
      <dc:creator>Dazbellboy</dc:creator>
      <dc:date>2017-03-16T01:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349212#M116217</link>
      <description>Hi,&lt;BR /&gt;From your description, you can use connection type "RunIf" which &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;triggers a subjob or component in case the condition defined is met.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;tfileinput--&amp;gt;tjavarow--&amp;gt;runif(valid data)--&amp;gt;inputrow--&amp;gt;output&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&amp;gt;runif(invalid data)--&amp;gt;inputrow--&amp;gt;output_2&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Thu, 16 Mar 2017 08:11:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349212#M116217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-16T08:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349213#M116218</link>
      <description>There is an easy way of doing this. First of all, don't use the tJavaRow for your validation logic. I'm assuming you are doing this because you have a Java background. If so, wrap your logic into a routine (a Java class using a static methods) and validate the data inside a tMap. This allows multiple outputs where you can easily specify logic to indicate exactly where you want the data to go. This tutorial from Talend might help&amp;nbsp;
&lt;A href="https://help.talend.com/search/all?query=tMap" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/search/all?query=tMap&lt;/A&gt;</description>
      <pubDate>Thu, 16 Mar 2017 09:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349213#M116218</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-16T09:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349214#M116219</link>
      <description>&lt;BLOCKQUOTE&gt;
  xdshi wrote: 
 &lt;BR /&gt;Hi, 
 &lt;BR /&gt;From your description, you can use connection type "RunIf" which 
 &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;triggers a subjob or component in case the condition defined is met.&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;BR /&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;tfileinput--&amp;gt;tjavarow--&amp;gt;runif(valid data)--&amp;gt;inputrow--&amp;gt;output&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;BR /&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&amp;gt;runif(invalid data)--&amp;gt;inputrow--&amp;gt;output_2&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;BR /&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt; 
 &lt;BR /&gt; 
 &lt;FONT size="2"&gt;&lt;FONT face="noto," helvetica=""&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi xdshi. 
&lt;BR /&gt;Well, I know I can run a subjob with a tRunJob, but I'm not sure how to transfer the output data from a tJavaRow to a tRunJob. I had to use the runIf invoking a new File. Please see my screenshot 
&lt;BR /&gt; 
&lt;BR /&gt;I obtain the list files with the tFileList, then I load the file in the tFileInputPositional with a ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) and the data validation is done with the JavaRow (rhall says that I can do the validations in a tMap, but tMap use the minimum java knowledge and I need import librarys such as java.util.regex or&amp;nbsp;java.text.SimpleDateFormat) so, after the validations, in order to get the data from the tJavaRow, I just had to reload the file to get the line I need to insert in ORACLE. 
&lt;BR /&gt; 
&lt;BR /&gt;Thank you very much for your help... However, I need find another solution. 
&lt;BR /&gt; 
&lt;IMG src="https://community.talend.com/legacyfs/online/411227/blob_20170323-1014.png" /&gt;</description>
      <pubDate>Thu, 23 Mar 2017 17:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349214#M116219</guid>
      <dc:creator>Dazbellboy</dc:creator>
      <dc:date>2017-03-23T17:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349215#M116220</link>
      <description>&lt;BLOCKQUOTE&gt;
  rhall_2.0 wrote: 
 &lt;BR /&gt;There is an easy way of doing this. First of all, don't use the tJavaRow for your validation logic. I'm assuming you are doing this because you have a Java background. If so, wrap your logic into a routine (a Java class using a static methods) and validate the data inside a tMap. This allows multiple outputs where you can easily specify logic to indicate exactly where you want the data to go. This tutorial from Talend might help&amp;nbsp; 
 &lt;A href="https://help.talend.com/search/all?query=tMap" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/search/all?query=tMap&lt;/A&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi rhall, Thanks for your answer. 
&lt;BR /&gt;Just as I told xdshi, I can't implement complex Java logic with the tMap (at least, I don't know how). I can work with a routine made by me, but I can't specify the output into a tMap (If the data is valid, then send it to the tMap output X, if the data is invalid, then send it to the output Y)... That is what I got from your answer.</description>
      <pubDate>Thu, 23 Mar 2017 17:18:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349215#M116220</guid>
      <dc:creator>Dazbellboy</dc:creator>
      <dc:date>2017-03-23T17:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349216#M116221</link>
      <description>All of your logic can be contained with a tMap. Take a look at the link I posted n my last post. That will show you how you can push your data in different directions with a tMap. With regard to your complex logic, you can write routines (Java classes with static methods) which can be called inside the tMaps. You have the concept of tMap variables which are processed from top to bottom and hold their values between rows (very important and useful to remember). You can use these to call your routine methods.&amp;nbsp;</description>
      <pubDate>Thu, 23 Mar 2017 17:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349216#M116221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T17:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349217#M116222</link>
      <description>Can you add a column to the tJavaRow output that specifies the "direction" you want it to go? &amp;nbsp;If so, it would be a simple matter to split the output using a tMap with a simple conditional on your new column.</description>
      <pubDate>Thu, 23 Mar 2017 19:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349217#M116222</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-03-23T19:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349218#M116223</link>
      <description>As rhall_2.0 has mentioned using tmap variables, you can set flags(boolean vars) based on your validation requirements and create multiple outputs for tmap and based on those flag values for each row pass the value in respective output flows.</description>
      <pubDate>Fri, 24 Mar 2017 01:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349218#M116223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-24T01:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349219#M116224</link>
      <description>&lt;BLOCKQUOTE&gt;
  rana.abhimanyu90 wrote: 
 &lt;BR /&gt;As rhall_2.0 has mentioned using tmap variables, you can set flags(boolean vars) based on your validation requirements and create multiple outputs for tmap and based on those flag values for each row pass the value in respective output flows. 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;To everyone, thank you very much. I applied all your advices, it works fine... But rhall_2.0, I decided put all the validations into a tJavaRow, it seems easier... maybe it's not good for portability but I can manage the Exceptions easily. 
&lt;BR /&gt; 
&lt;IMG src="https://community.talend.com/legacyfs/online/411227/blob_20170323-1857.png" /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.talend.com/legacyfs/online/411227/blob_20170323-1858.png" /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;IMG src="https://community.talend.com/legacyfs/online/411227/blob_20170323-1900.png" /&gt;</description>
      <pubDate>Fri, 24 Mar 2017 02:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349219#M116224</guid>
      <dc:creator>Dazbellboy</dc:creator>
      <dc:date>2017-03-24T02:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349220#M116225</link>
      <description>&lt;BLOCKQUOTE&gt;
  dazbellboy wrote: 
 &lt;BR /&gt; 
 &lt;BLOCKQUOTE&gt;
   rana.abhimanyu90 wrote: 
  &lt;BR /&gt;As rhall_2.0 has mentioned using tmap variables, you can set flags(boolean vars) based on your validation requirements and create multiple outputs for tmap and based on those flag values for each row pass the value in respective output flows. 
 &lt;/BLOCKQUOTE&gt; 
 &lt;BR /&gt;To everyone, thank you very much. I applied all your advices, it works fine... But rhall_2.0, I decided put all the validations into a tJavaRow, it seems easier... maybe it's not good for portability but I can manage the Exceptions easily. 
 &lt;BR /&gt; 
 &lt;A href="https://community.talend.com/legacyfs/online/411227/blob_20170323-1857.png"&gt;https://www.talendforge.org/forum/img/members/411227/mini_blob_20170323-1857.png&lt;/A&gt; 
 &lt;BR /&gt; 
 &lt;BR /&gt; 
 &lt;A href="https://community.talend.com/legacyfs/online/411227/blob_20170323-1858.png"&gt;https://www.talendforge.org/forum/img/members/411227/mini_blob_20170323-1858.png&lt;/A&gt; 
 &lt;BR /&gt; 
 &lt;BR /&gt; 
 &lt;A href="https://community.talend.com/legacyfs/online/411227/blob_20170323-1900.png"&gt;https://www.talendforge.org/forum/img/members/411227/mini_blob_20170323-1900.png&lt;/A&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;That's how I choose the output in the tmap: 
&lt;BR /&gt; 
&lt;IMG src="https://community.talend.com/legacyfs/online/411227/blob_20170323-1907.png" /&gt;</description>
      <pubDate>Fri, 24 Mar 2017 02:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349220#M116225</guid>
      <dc:creator>Dazbellboy</dc:creator>
      <dc:date>2017-03-24T02:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Use Multiple outputs with tJavaRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349221#M116226</link>
      <description>It really is up to you. I was being very literal and thought you wanted to do it all in one component. You can do it all with the tMap but it might be easier to understand doing it your way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sat, 25 Mar 2017 00:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Use-Multiple-outputs-with-tJavaRow/m-p/2349221#M116226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-25T00:49:13Z</dc:date>
    </item>
  </channel>
</rss>

