<?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: tinfiniteloop and global variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205308#M5818</link>
    <description>Thanks again. This helps</description>
    <pubDate>Wed, 10 Jun 2020 18:09:12 GMT</pubDate>
    <dc:creator>Pariniranjan</dc:creator>
    <dc:date>2020-06-10T18:09:12Z</dc:date>
    <item>
      <title>tinfiniteloop and global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205304#M5814</link>
      <description>I want to run a subjob in a loop. My design would go something like below 
&lt;BR /&gt; 
&lt;BR /&gt;tinfiniteloop -&amp;gt; trunsubjob 
&lt;BR /&gt; 
&lt;BR /&gt;Subjob: 
&lt;BR /&gt;Oracle sp call -&amp;gt; 
&lt;BR /&gt;On subjobok -&amp;gt; 
&lt;BR /&gt;Oracle input -&amp;gt; tmap -&amp;gt; tsetglobalvar -&amp;gt; twritejsonfield -&amp;gt; trestclient -&amp;gt; tdbrow 
&lt;BR /&gt; 
&lt;BR /&gt;To describe above, I would need to call a stored procedure which inserts data from table A to table B based on a date condition . Then onsubjob ok , extract data from table B and map it and set one of the column which is unique into global variable and then form a json request for each of the record retrieved from table B and post to rest API. Upon successful response, retrieve the global variable of the current record and update a column "processed flag" on table B from "no" to "yes" 
&lt;BR /&gt; 
&lt;BR /&gt;Here are my questions, 
&lt;BR /&gt; 
&lt;BR /&gt;1. Would set the wait for each iteration on tinfiniteloop to 15 minutes. If a current iteration exceeds 15 minutes, would tinfiniteloop wait for it to complete or would it trigger anyway the next iteration? 
&lt;BR /&gt; 
&lt;BR /&gt;2. In this scenario, would global variable be thread safe? Meaning I'm taking each database record and making it a json for rest API and updating this record again upon successful response 
&lt;BR /&gt; 
&lt;BR /&gt;3. Is this design for the use case feasible or any suggestions are appreciated</description>
      <pubDate>Sun, 07 Jun 2020 14:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205304#M5814</guid>
      <dc:creator>Pariniranjan</dc:creator>
      <dc:date>2020-06-07T14:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: tinfiniteloop and global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205305#M5815</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;tInfiniteLoop will trigger anyway the next iteration when the wait time is up. If you need to wait for the last iteration finishes, and the next iteration will be executed only when all the steps in last iteration executed successfully. You can use tLoop component with While type, define the Condition field with a context variable (boolean type, the default value is true). Set the condition variable as true in the end of iteration if all the steps execute successfully, otherwise, set it as false. &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shong&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 03:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205305#M5815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-08T03:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: tinfiniteloop and global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205306#M5816</link>
      <description>Thanks Shong. I went with tinfiniteloop anyway and incorporated tfiletouch and tfiledelete to have lock file over current iteration so subsequent steps are not executed on the next timed trigger when the current iteration is still in progress 
&lt;BR /&gt; 
&lt;BR /&gt;Also I've a follow up question. I'm currently using tflowtoiterate from a database to iterate over each record and pass it on to rest api. The api returns generic response. So I need to keep track of each record and update one of the column named 'processed flag' after a successful response from the api. Is it advisable to use tflowtoiterate this way? Say in one of my run, there are close to 100k records extracted, would tflowtoiterate hold all these records as key value pairs or is there any limitations?&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009MaxI"&gt;tmp_1591728413025.jpg&lt;/A&gt;</description>
      <pubDate>Tue, 09 Jun 2020 20:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205306#M5816</guid>
      <dc:creator>Pariniranjan</dc:creator>
      <dc:date>2020-06-09T20:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: tinfiniteloop and global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205307#M5817</link>
      <description>&lt;P&gt;Yes, I will use tFlowToterate if I need to iterate each row for next business processing, and I will consider enabling parallel execution for the iteration to improve the performance.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2020-06-10_10-40-48.png" style="width: 928px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MZt8.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134375i6E59E35258F667EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MZt8.png" alt="0683p000009MZt8.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt; If you read the generated code of job, you will see it is tOralceInput query all data and cache them into memory, and then iterate each record, tFlowToterate does not hold all these records. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 03:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205307#M5817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-10T03:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: tinfiniteloop and global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205308#M5818</link>
      <description>Thanks again. This helps</description>
      <pubDate>Wed, 10 Jun 2020 18:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tinfiniteloop-and-global-variable/m-p/2205308#M5818</guid>
      <dc:creator>Pariniranjan</dc:creator>
      <dc:date>2020-06-10T18:09:12Z</dc:date>
    </item>
  </channel>
</rss>

