<?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: Dynamic Variable - iterate over list in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262861#M43190</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; You cannot run the Python code directly using Talend components. The trick is to call them using Talend terminal components like tSystem, tSSH etc. where you can pass the value to your Python script through Windows commands or Linux Shell Scripting.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2019 14:59:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-31T14:59:47Z</dc:date>
    <item>
      <title>Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262858#M43187</link>
      <description>&lt;P&gt;I have a scenario where I need to iterate over a list(table column) and execute python code for whatever value variable holds at that moment and then move of the next value in the list - till all the items in the list have been processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some background:&lt;/P&gt;
&lt;P&gt;I have a table with a column that contains branch code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TableA&lt;/P&gt;
&lt;P&gt;BranchCode&lt;/P&gt;
&lt;P&gt;123&lt;/P&gt;
&lt;P&gt;124&lt;/P&gt;
&lt;P&gt;125&lt;/P&gt;
&lt;P&gt;126&lt;/P&gt;
&lt;P&gt;127&lt;/P&gt;
&lt;P&gt;128&lt;/P&gt;
&lt;P&gt;129&lt;/P&gt;
&lt;P&gt;130&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Minimal Solution&lt;/P&gt;
&lt;P&gt;What I would like my Talend flow is to iterate over the values in the column - for example for branch 123, set the variable, pass the variable to python code and execute python code. After that move on to next value in the column 124, set the variable, pass the variable to python and execute python code.. and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideal Solution:&lt;/P&gt;
&lt;P&gt;Ideally what I would like to do is split long list of values in the column between a parallelized workflow where each flow within the parallelized job take a set of values (let's say 25% each) and iterates over that. But this is more complex than minimal solution. So flow1 will get 123,124 and flow2 will get 125,125 and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I accomplish this in Talend?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262858#M43187</guid>
      <dc:creator>talendstar</dc:creator>
      <dc:date>2024-11-16T05:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262859#M43188</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069JotAAE"&gt;@talendstar&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the TalendDBComponent -&amp;gt;tFlowToIterate-&amp;gt;tRunJob (in tRunJob settings add the globalVaribale of flow to Iterate as context)&lt;/P&gt;
&lt;P&gt;Your tRunJob will have the code for python.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Subhadip&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 22:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262859#M43188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T22:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262860#M43189</link>
      <description>&lt;P&gt;Is it possible to pass the variable to a Python script that is run with tRunJob? or is there any other way to pass the variable to a python script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 14:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262860#M43189</guid>
      <dc:creator>talendstar</dc:creator>
      <dc:date>2019-07-31T14:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262861#M43190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; You cannot run the Python code directly using Talend components. The trick is to call them using Talend terminal components like tSystem, tSSH etc. where you can pass the value to your Python script through Windows commands or Linux Shell Scripting.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 14:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262861#M43190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-31T14:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262862#M43191</link>
      <description>&lt;P&gt;I usually run python scripts via .bat files and call the .bat file via tsystem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an example of passing variables to tsystem and then onto .bat file or python script that I can refer to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 15:47:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262862#M43191</guid>
      <dc:creator>talendstar</dc:creator>
      <dc:date>2019-07-31T15:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable - iterate over list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262863#M43192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;Could you please check the below link? Its not exactly same but will give you an idea.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCq6dCAC" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/passing-convext-parameter-value-to-the-shell-scripts-in-tSSH-to/td-p/41065&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 16:03:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable-iterate-over-list/m-p/2262863#M43192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-31T16:03:05Z</dc:date>
    </item>
  </channel>
</rss>

