<?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: Nightmare just to do such a simple thing in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199694#M2494</link>
    <description>&lt;P&gt;"use a tFixedFlowInput to create a fake row with the expected schema and store it into a tHashOutput.&lt;/P&gt; 
&lt;P&gt;Then you can ruse it anywhere in your job using an associated tHashInput."&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;- I dont see how is this flexible , especialy for such a simple "if... then ... else ... case"&lt;/P&gt; 
&lt;P&gt;- I dont need to create a hash and I dont have any problem creating the row,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a problem with the 2 &lt;STRONG&gt;runif&lt;/STRONG&gt; connections that need to get back to tFlowIterate_4&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;- one way is the dbinput (having a row from previous query)&lt;/P&gt; 
&lt;P&gt;- the other way creating a fake row value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;so simple...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 894px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Bn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148879iEB2FCD80590FB6B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Bn.png" alt="0683p000009M8Bn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2019 07:27:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-15T07:27:35Z</dc:date>
    <item>
      <title>Nightmare just to do such a simple thing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199692#M2492</link>
      <description>&lt;P&gt;Hello&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;sometimes my query does not return any row, I want to force a default value and create a fake row so my process continues&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;note that my flow if quiet cumbersome since Talend offers no flexibility at all&lt;/P&gt; 
&lt;P&gt;I have to use a flowiterate otherwise I cannot connect components together&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regrads&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 816px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7z4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129325i282D57C2AD004718/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7z4.png" alt="0683p000009M7z4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199692#M2492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nightmare just to do such a simple thing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199693#M2493</link>
      <description>&lt;P&gt;Thanks to Talend flexibility (yes it is!), there is more than 1 way to cover this kind of case.&lt;/P&gt;
&lt;P&gt;For example, use a tFixedFlowInput to create a fake row with the expected schema and store it into a tHashOutput.&lt;/P&gt;
&lt;P&gt;Then you can ruse it anywhere in your job using an associated tHashInput.&lt;/P&gt;
&lt;P&gt;The real question is "&lt;EM&gt;what do you want to do?&lt;/EM&gt;" as it is not so clear just with your job design.&lt;/P&gt;
&lt;P&gt;If you clarify this point, maybe someone could give you good ideas to achieve what you want.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 09:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199693#M2493</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-10-14T09:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nightmare just to do such a simple thing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199694#M2494</link>
      <description>&lt;P&gt;"use a tFixedFlowInput to create a fake row with the expected schema and store it into a tHashOutput.&lt;/P&gt; 
&lt;P&gt;Then you can ruse it anywhere in your job using an associated tHashInput."&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;- I dont see how is this flexible , especialy for such a simple "if... then ... else ... case"&lt;/P&gt; 
&lt;P&gt;- I dont need to create a hash and I dont have any problem creating the row,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a problem with the 2 &lt;STRONG&gt;runif&lt;/STRONG&gt; connections that need to get back to tFlowIterate_4&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;- one way is the dbinput (having a row from previous query)&lt;/P&gt; 
&lt;P&gt;- the other way creating a fake row value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;so simple...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 894px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Bn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148879iEB2FCD80590FB6B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Bn.png" alt="0683p000009M8Bn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 07:27:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199694#M2494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-15T07:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Nightmare just to do such a simple thing</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199695#M2495</link>
      <description>&lt;P&gt;I still don't know exactly what you want to do but I try:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="job.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M808.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150956i913CE33F4CC48047/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M808.png" alt="0683p000009M808.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;You have to know (or maybe you know it), there are some rules regarding the order the connections between components are executed and each connection type got a specific role. Also, it seems you want to have a double entry to the tFlowToIterate_4 component but this not possible as this component accept only one entry.&lt;/P&gt; 
&lt;P&gt;So, the design should look like what I propose here (but again, as I don't know what you want to do, maybe this proposition is not appropriate).&lt;/P&gt; 
&lt;P&gt;The job begins as yours, but I replace your tJavaRow_2&amp;nbsp;by the tJava_6 with the following code:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;if(((Integer)globalMap.get("tMysqlInput_1_NB_LINE")) == 0){
	globalMap.put("yourVariable_1", "yourValue");	
	globalMap.put("yourVariable_2", "yourValue");	
}&lt;/PRE&gt; 
&lt;P&gt;This is to populate global variables in case of the SQL query returns no row.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When the first 3 components are finished, a new subjob starts with a dummy tJava which is there just to permit a conditional (If) connection to the next tMysqlInput component. The "if" expression is as yours (((Integer)globalMap.get("tMysqlInput_1_NB_LINE")) &amp;gt; 0).&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So finally, if the 1rst query returns no row, global variables are populated by tJava_6 else they are populated by tFlowToIterate (and this is your responsibility to use the same names).&lt;/P&gt; 
&lt;P&gt;May be it could be more simple but one more time, if you don't explain what is the purpose of your job, it is difficult to guess a better solution.&lt;/P&gt; 
&lt;P&gt;Last, for your information, there is no "else" connection in Talend so you have to deal with combinaisons of "if" and it works like a charm, I say it in all honesty, I'm not (yet) payed by Talend for that.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 08:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Nightmare-just-to-do-such-a-simple-thing/m-p/2199695#M2495</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-10-15T08:26:35Z</dc:date>
    </item>
  </channel>
</rss>

