<?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: tloop never ends in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358601#M123593</link>
    <description>Assuming you have the correct globalMap key and the correct number of rows are being returned, it looks okay to me.
&lt;BR /&gt;I'd check the Java code to ensure that looks okay...
&lt;BR /&gt;while (((Integer) globalMap.get("tMysqlInput_2_NB_LINE") &amp;lt;= 4)) {
&lt;BR /&gt;...
&lt;BR /&gt;globalMap.put("tMysqlInput_2_NB_LINE", nb_line_tMysqlInput_1);
&lt;BR /&gt;...
&lt;BR /&gt;}</description>
    <pubDate>Thu, 19 Sep 2013 21:32:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-19T21:32:18Z</dc:date>
    <item>
      <title>tloop never ends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358600#M123592</link>
      <description>Hi, 
&lt;BR /&gt; 
&lt;BR /&gt;I want tloop component to run until the count of records from MySQL component(Talend_Statistics_READ) =4 and once the condition is met, I want the remaining ETL to run. 
&lt;BR /&gt;But in my case when count =4, the loop is not ending and thereby running the remaining ETL multiple times. 
&lt;BR /&gt;I tried to modify the condition in tloop component but can't get it to work as required. When I set the condition 
&lt;BR /&gt;as ((Integer)globalMap.get("tMysqlInput_2_NB_LINE")==4), Job starts and ends immediately. 
&lt;BR /&gt;Any ideas. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;anut 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAub.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135380iB58A615B0A713289/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAub.png" alt="0683p000009MAub.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBGq.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130592i3B07C04959292860/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBGq.png" alt="0683p000009MBGq.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 19 Sep 2013 20:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358600#M123592</guid>
      <dc:creator>anut</dc:creator>
      <dc:date>2013-09-19T20:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: tloop never ends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358601#M123593</link>
      <description>Assuming you have the correct globalMap key and the correct number of rows are being returned, it looks okay to me.
&lt;BR /&gt;I'd check the Java code to ensure that looks okay...
&lt;BR /&gt;while (((Integer) globalMap.get("tMysqlInput_2_NB_LINE") &amp;lt;= 4)) {
&lt;BR /&gt;...
&lt;BR /&gt;globalMap.put("tMysqlInput_2_NB_LINE", nb_line_tMysqlInput_1);
&lt;BR /&gt;...
&lt;BR /&gt;}</description>
      <pubDate>Thu, 19 Sep 2013 21:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358601#M123593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-19T21:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: tloop never ends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358602#M123594</link>
      <description>if you set ((Integer)globalMap.get("tMysqlInput_2_NB_LINE")==4), job will end immediately definitely. 
&lt;BR /&gt;because you choose while condition and set declaration globalMap.put("tMysqlInput_2_NB_LINE",0) 
&lt;BR /&gt;like 
&lt;BR /&gt; 
&lt;PRE&gt;int i=0;&lt;BR /&gt;while (i==4)&lt;BR /&gt;{&lt;BR /&gt;//loop cant be run because the condition is false&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;and without iteration, when condition is right 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;(Integer)globalMap.get("tMysqlInput_2_NB_LINE")&amp;lt;=4) 
&lt;BR /&gt; loop cant be ended 
&lt;BR /&gt;So i suggest that you should re-desgin your job...</description>
      <pubDate>Fri, 20 Sep 2013 08:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358602#M123594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-20T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: tloop never ends</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358603#M123595</link>
      <description>Setting aside the i==4 issue, the original requirement looked ok, to me.
&lt;BR /&gt;Assuming that everything I couldn't see from the Job, as good.
&lt;BR /&gt;The while expressions look a little odd; but they should translate to what seems to be required.</description>
      <pubDate>Fri, 20 Sep 2013 08:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tloop-never-ends/m-p/2358603#M123595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-20T08:57:30Z</dc:date>
    </item>
  </channel>
</rss>

