<?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 tMap - How do i know if I am on the last row? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMap-How-do-i-know-if-I-am-on-the-last-row/m-p/2347711#M114924</link>
    <description>&lt;P&gt;I need to know if I am on the last row in a tmap to perform logic. &amp;nbsp;Is there an flag any where that I can use? &amp;nbsp;I was thinking of counting the rows in the file before the tMap and maintain a counter within.&lt;/P&gt;</description>
    <pubDate>Sat, 24 Sep 2016 01:44:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-24T01:44:27Z</dc:date>
    <item>
      <title>tMap - How do i know if I am on the last row?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-How-do-i-know-if-I-am-on-the-last-row/m-p/2347711#M114924</link>
      <description>&lt;P&gt;I need to know if I am on the last row in a tmap to perform logic. &amp;nbsp;Is there an flag any where that I can use? &amp;nbsp;I was thinking of counting the rows in the file before the tMap and maintain a counter within.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2016 01:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-How-do-i-know-if-I-am-on-the-last-row/m-p/2347711#M114924</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-24T01:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: tMap - How do i know if I am on the last row?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-How-do-i-know-if-I-am-on-the-last-row/m-p/2347712#M114925</link>
      <description>Hi &amp;nbsp; 
&lt;BR /&gt;No a direct way to know it, you can count the rows first, and then add a sequence id to each row in the next subjob, for example: 
&lt;BR /&gt;tfileinputDelimited1--main---tJavaRow 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; | 
&lt;BR /&gt;tfileinputDelimited2--main--tMap--&amp;gt; 
&lt;BR /&gt; 
&lt;BR /&gt;there is a global variable defined on tfileinputdelimited1 to store the total number of rows are read from the file: 
&lt;BR /&gt;((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) 
&lt;BR /&gt; 
&lt;BR /&gt;on tMap: add a new column as row number, set its expression as: Numeric.sequence("s1",1,1) 
&lt;BR /&gt; 
&lt;BR /&gt;Regard 
&lt;BR /&gt;Shong</description>
      <pubDate>Sat, 24 Sep 2016 04:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-How-do-i-know-if-I-am-on-the-last-row/m-p/2347712#M114925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-24T04:51:18Z</dc:date>
    </item>
  </channel>
</rss>

