<?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: Insert every 100 row in table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248270#M33188</link>
    <description>Yes, I tried to get cheeky and fix the first row problem by starting the sequencer at 0. &amp;nbsp;In Java, 0 mod anything returns 0. &amp;nbsp;However, the rest of the rows would then be off by one, so you'd effectively be inserting rows 99, 199, 299, etc.</description>
    <pubDate>Mon, 14 Nov 2016 21:51:54 GMT</pubDate>
    <dc:creator>cterenzi</dc:creator>
    <dc:date>2016-11-14T21:51:54Z</dc:date>
    <item>
      <title>Insert every 100 row in table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248266#M33184</link>
      <description>Hi,
&lt;BR /&gt;I have a problem statement.
&lt;BR /&gt;I have X number of rows from input and I have to pass 1st row,100th row, 200th row and so on till last record.
&lt;BR /&gt;Last record should also be insert in target table.
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Saurabh</description>
      <pubDate>Thu, 10 Nov 2016 17:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248266#M33184</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-11-10T17:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Insert every 100 row in table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248267#M33185</link>
      <description>Hi,&lt;BR /&gt;Please answer the following questions first as a possible solution depends on the components to be used:&lt;BR /&gt;&lt;BR /&gt;What is the source of your data? A delimited file? A database table? Is it the output of an already existing part of your job?&lt;BR /&gt;What is the target? Is it an Oracle or MySQL table? Is it something different?&lt;BR /&gt;&lt;BR /&gt;Regards, Joachim</description>
      <pubDate>Thu, 10 Nov 2016 20:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248267#M33185</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2016-11-10T20:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Insert every 100 row in table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248268#M33186</link>
      <description>Append a row number with simple sequencer to your input data using a tMap formula of:
&lt;BR /&gt;Numeric.sequence("s1",0,1)
&lt;BR /&gt;Your input component should set a variable NB_LINE that you can reference to get the row count. &amp;nbsp;The exact variable name varies depending on the name of your input component:
&lt;BR /&gt;((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE"))
&lt;BR /&gt;I'm not sure if you can reference the output of that sequence in the same tMap, but if not, add a second tMap with a formula:
&lt;BR /&gt;(rownum % 100 == 0 || rownum == (Integer)globalMap.get("tPostgresqlInput_1_NB_LINE")) ? "KEEP" : "REJECT"
&lt;BR /&gt;A tFilter will reduce the set down to the records to keep, then a database output component can store them.</description>
      <pubDate>Fri, 11 Nov 2016 20:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248268#M33186</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2016-11-11T20:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Insert every 100 row in table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248269#M33187</link>
      <description>If you follow the solution suggested above, you will have to add a condition for the first record as well. Put this in the tMap expression filter (top right of the output - arrow with the "+" sign on top): 
&lt;BR /&gt;rownum % 100 == 0 || rownum == 1 || rownum == ((Integer)globalMap.get("tPostgresqlInput_1_NB_LINE")) 
&lt;BR /&gt;But again, the exact setup depends on your input and output components.</description>
      <pubDate>Sun, 13 Nov 2016 19:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248269#M33187</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2016-11-13T19:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Insert every 100 row in table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248270#M33188</link>
      <description>Yes, I tried to get cheeky and fix the first row problem by starting the sequencer at 0. &amp;nbsp;In Java, 0 mod anything returns 0. &amp;nbsp;However, the rest of the rows would then be off by one, so you'd effectively be inserting rows 99, 199, 299, etc.</description>
      <pubDate>Mon, 14 Nov 2016 21:51:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-every-100-row-in-table/m-p/2248270#M33188</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2016-11-14T21:51:54Z</dc:date>
    </item>
  </channel>
</rss>

