<?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: Loop through input file to populate context variable to be used in job in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370187#M133262</link>
    <description>I figured this out by just using tJavaFlex in place of tRSSInput and adding some Java (see below)....&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;context.name = ((String)globalMap.get("row1.name"));&lt;BR /&gt;row2.name = context.name;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;thanks for all your help.</description>
    <pubDate>Fri, 10 Jul 2015 16:18:19 GMT</pubDate>
    <dc:creator>tale103108</dc:creator>
    <dc:date>2015-07-10T16:18:19Z</dc:date>
    <item>
      <title>Loop through input file to populate context variable to be used in job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370183#M133258</link>
      <description>Talend 5.4&lt;BR /&gt;Linux 6.2&lt;BR /&gt;I want to read a text file that contains one value per row, use that value to populate a context variable (or a variable) and then go to a sub job that uses the variable, then repeat through file (and the process) until the end of file.&lt;BR /&gt;How to do?&lt;BR /&gt;Thank you all.</description>
      <pubDate>Thu, 02 Jul 2015 20:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370183#M133258</guid>
      <dc:creator>tale103108</dc:creator>
      <dc:date>2015-07-02T20:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through input file to populate context variable to be used in job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370184#M133259</link>
      <description>Hi, 
&lt;BR /&gt;From your description, it seems that you are looking for tContextLoad or Implicit tContextLoad. 
&lt;BR /&gt;Could you please take a look at component: 
&lt;A href="https://help.talend.com/search/all?query=tContextLoad&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter:tContextLoad&lt;/A&gt; 
&lt;BR /&gt;and&amp;nbsp;a forum about How to use Implicit tContextLoad in use case&amp;nbsp; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCoR7CAK" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-Iterate-through-a-list-of-URL-s-for-tRSSInput/td-p/94539&lt;/A&gt;&amp;nbsp;to see if it is satisfying your needs? 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 03 Jul 2015 09:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370184#M133259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-03T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through input file to populate context variable to be used in job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370185#M133260</link>
      <description>In the link you provided, if you look at some of the responses, Shong comes close to what I am looking for when he states the following: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;&lt;I&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;You can use tFlowToIterate to iterate all rowss one by one, for example:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;I&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tFileInputDelimited--main(row1)--&amp;gt;tFlowToIterate--iterate--tRSSInput--main--tLogRow&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;I&gt;on tRSSInput, set the RSS URL field as: row1.url&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;However, what I need in place of the tRSSInput would be a tContextLoad. &amp;nbsp;And then once the context is loaded I need to call another subjob to use that context. &amp;nbsp;Then I need to repeat this step for each row in the tFileInputDelimited. &amp;nbsp;That input file, by the way, would have the following structure (i.e. same context key, different values): 
&lt;BR /&gt;name=John 
&lt;BR /&gt;name=Carol 
&lt;BR /&gt;name=Joan 
&lt;BR /&gt;... 
&lt;BR /&gt;Please advise and if you have a snapshot of the flow that would help tremendously.</description>
      <pubDate>Thu, 09 Jul 2015 15:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370185#M133260</guid>
      <dc:creator>tale103108</dc:creator>
      <dc:date>2015-07-09T15:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through input file to populate context variable to be used in job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370186#M133261</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;In the link you provided, if you look at some of the responses, Shong comes close to what I am looking for when he states the following:&lt;BR /&gt; 
     &lt;BLOCKQUOTE&gt; 
      &lt;TABLE border="1"&gt; 
       &lt;TBODY&gt; 
        &lt;TR&gt; 
         &lt;TD&gt;&lt;I&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;You can use tFlowToIterate to iterate all rowss one by one, for example:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;I&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tFileInputDelimited--main(row1)--&amp;gt;tFlowToIterate--iterate--tRSSInput--main--tLogRow&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;I&gt;on tRSSInput, set the RSS URL field as: row1.url&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt; 
        &lt;/TR&gt; 
       &lt;/TBODY&gt; 
      &lt;/TABLE&gt; 
     &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;However, what I need in place of the tRSSInput would be a tContextLoad. &amp;nbsp;And then once the context is loaded I need to call another subjob to use that context. &amp;nbsp;Then I need to repeat this step for each row in the tFileInputDelimited. &amp;nbsp;That input file, by the way, would have the following structure (i.e. same context key, different values):&lt;BR /&gt;name=John&lt;BR /&gt;name=Carol&lt;BR /&gt;name=Joan&lt;BR /&gt;...&lt;BR /&gt;Please advise and if you have a snapshot of the flow that would help tremendously.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;I would replace tRSSInput by tJavarow and tLogRow by tRunJob (your child job)</description>
      <pubDate>Thu, 09 Jul 2015 15:55:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370186#M133261</guid>
      <dc:creator>Jcs19</dc:creator>
      <dc:date>2015-07-09T15:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through input file to populate context variable to be used in job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370187#M133262</link>
      <description>I figured this out by just using tJavaFlex in place of tRSSInput and adding some Java (see below)....&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;context.name = ((String)globalMap.get("row1.name"));&lt;BR /&gt;row2.name = context.name;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;thanks for all your help.</description>
      <pubDate>Fri, 10 Jul 2015 16:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-input-file-to-populate-context-variable-to-be-used/m-p/2370187#M133262</guid>
      <dc:creator>tale103108</dc:creator>
      <dc:date>2015-07-10T16:18:19Z</dc:date>
    </item>
  </channel>
</rss>

