<?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 Update previous rows in tMap or tJava in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370597#M133624</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt; 
&lt;P&gt;I need one help to build below logic, we can use tMap or tJava.&lt;BR /&gt;My input and output is text file.&lt;/P&gt; 
&lt;P&gt;I want to populate Missing data using same value as first available value as per below screenshot.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="One.jpg" style="width: 669px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPdc.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139047iCE0243463C99B49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPdc.jpg" alt="0683p000009MPdc.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;above lookup can be used if required&lt;BR /&gt;Also Flag = "Y" can be used (denoted manually updated)&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;dataset&lt;/P&gt; 
&lt;P&gt;Acc_no|Period|Value|Flag&lt;BR /&gt;101|201601||Y&lt;BR /&gt;101|201602||Y&lt;BR /&gt;101|201603||Y&lt;BR /&gt;101|201604|30|N&lt;BR /&gt;101|201605|35|N&lt;BR /&gt;101|201606|35|Y&lt;BR /&gt;101|201607|35|Y&lt;BR /&gt;201|201601||Y&lt;BR /&gt;201|201602||Y&lt;BR /&gt;201|201603||Y&lt;BR /&gt;201|201604|33|N&lt;BR /&gt;201|201605|44|N&lt;BR /&gt;201|201606|44|Y&lt;BR /&gt;201|201607|44|Y&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;BR /&gt;Sachin&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jul 2018 18:18:08 GMT</pubDate>
    <dc:creator>SachinD</dc:creator>
    <dc:date>2018-07-25T18:18:08Z</dc:date>
    <item>
      <title>Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370597#M133624</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt; 
&lt;P&gt;I need one help to build below logic, we can use tMap or tJava.&lt;BR /&gt;My input and output is text file.&lt;/P&gt; 
&lt;P&gt;I want to populate Missing data using same value as first available value as per below screenshot.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="One.jpg" style="width: 669px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPdc.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139047iCE0243463C99B49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPdc.jpg" alt="0683p000009MPdc.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;above lookup can be used if required&lt;BR /&gt;Also Flag = "Y" can be used (denoted manually updated)&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;dataset&lt;/P&gt; 
&lt;P&gt;Acc_no|Period|Value|Flag&lt;BR /&gt;101|201601||Y&lt;BR /&gt;101|201602||Y&lt;BR /&gt;101|201603||Y&lt;BR /&gt;101|201604|30|N&lt;BR /&gt;101|201605|35|N&lt;BR /&gt;101|201606|35|Y&lt;BR /&gt;101|201607|35|Y&lt;BR /&gt;201|201601||Y&lt;BR /&gt;201|201602||Y&lt;BR /&gt;201|201603||Y&lt;BR /&gt;201|201604|33|N&lt;BR /&gt;201|201605|44|N&lt;BR /&gt;201|201606|44|Y&lt;BR /&gt;201|201607|44|Y&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;BR /&gt;Sachin&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 18:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370597#M133624</guid>
      <dc:creator>SachinD</dc:creator>
      <dc:date>2018-07-25T18:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370598#M133625</link>
      <description>Hi 
&lt;BR /&gt;First, filter the null value and then do aggregation using tAggregateRow to get the first value of each Acc_no, output the value and put it to global variable for each Acc_no, the job looks like: 
&lt;BR /&gt;tfileinputdelimited1--tfilterRow--tAggregateRow--tJavaRow 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tfileinutDelimited2-row4--&amp;gt;tMap---tfileoutputDelimited 
&lt;BR /&gt;on tJavaRow: 
&lt;BR /&gt;globalMap.put(input_row.Acc_no, input_row.Value) 
&lt;BR /&gt; 
&lt;BR /&gt;on tMap, set the expression of Value column as; 
&lt;BR /&gt;row4.Flag.equals("Y")?(String)globalMap.get(row4.Acc_no):row4.Value 
&lt;BR /&gt; 
&lt;BR /&gt;Hope it helps! 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong 
&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Jul 2018 08:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370598#M133625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-26T08:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370599#M133626</link>
      <description>&lt;P&gt;I am little late to the party as&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;has already provided a solution. Anyways here goes mine -&lt;/P&gt; 
&lt;P&gt;Job Layout -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tSortRow-1.JPG" style="width: 585px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzQ1.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130723iF2D914F442D52F0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzQ1.jpg" alt="0683p000009LzQ1.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;So, basically using tSortRow and tFilterRow tried to find and filter out the non-empty records from the file and as a result tHashOutput would hold the distinct non null values from the input file.&lt;/P&gt; 
&lt;P&gt;On second step, read the file again and use tMap to join the original file content with the tHashOutput content to get the required output.&lt;/P&gt; 
&lt;P&gt;tMap configuration -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap-TC2.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzQ6.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145644i519B8895A52C1C40/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzQ6.jpg" alt="0683p000009LzQ6.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 08:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370599#M133626</guid>
      <dc:creator>iamabhishek</dc:creator>
      <dc:date>2018-07-26T08:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370600#M133627</link>
      <description>&lt;P&gt;Appreciate effort both of you&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKrZAAW"&gt;@iamabhishek&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;but Sachin already mentioned in his question that they already having lookup with him. So, job would be like:&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="one.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzQB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136068iAB0146DD1FA5F9CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzQB.png" alt="0683p000009LzQB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="two.PNG" style="width: 515px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzA9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144827i53E838DBAEDABF85/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzA9.png" alt="0683p000009LzA9.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LtGe"&gt;one.PNG&lt;/A&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370600#M133627</guid>
      <dc:creator>aashish_21nov</dc:creator>
      <dc:date>2018-07-26T09:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370601#M133628</link>
      <description>ah..yes, if the lookup is already available, it is more simple to achieve it like you did. 
&lt;A href="https://community.qlik.com/s/profile/0053p000007LOUUAA4"&gt;@aashish&lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370601#M133628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-26T09:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Update previous rows in tMap or tJava</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370602#M133629</link>
      <description>&lt;P&gt;Thanks and Kudos to&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKrZAAW"&gt;@iamabhishek&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOUUAA4"&gt;@aashish&lt;/A&gt;&amp;nbsp;for taking time and providing solution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Update-previous-rows-in-tMap-or-tJava/m-p/2370602#M133629</guid>
      <dc:creator>SachinD</dc:creator>
      <dc:date>2018-07-26T14:58:41Z</dc:date>
    </item>
  </channel>
</rss>

