<?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 tDBCommit every 1000 rows - how to? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341588#M109530</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;since the talend mysql components have no option "Commit every" (see &lt;A href="https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit" alt="https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit" target="_blank"&gt;https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit&lt;/A&gt;) to commit data e.g. every 1000 rows I tried to find a workaround but could not succeed.&lt;/P&gt;&lt;P&gt;Here is my flow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGH4oAAG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150651iFCAFA05D0203B378/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGH4oAAG.png" alt="0695b00000bGH4oAAG.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the component view and also in the log the tJavaFlex_1 together with tRESTClient_1 get data in chunks of 1000.&lt;/P&gt;&lt;P&gt;Every 1000 rows are move forward to tDBOutput_1 to write into the mysql database.&lt;/P&gt;&lt;P&gt;Using tBCommit_1 I wanted to commit all 1000 rows but this is not working, monitoring the mysql database shows that the data does not come in chunks of 1000.&lt;/P&gt;&lt;P&gt;At the end of the job (using tPost_1) I have a final commit and only then all 20000 records are committed as once.&lt;/P&gt;&lt;P&gt;tDBOutput_1 and tDBCommit_1 are set to "Use an existing connection" and point to same tDBConnection_1 component.&lt;/P&gt;&lt;P&gt;If I use the output 'Main' from tDBOutput_1 into tDBCommit_1 then every record is committed - but this is also not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connecting tDBCommit_1 to tJavaFlex_1 (OnSubjobOk) is also not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGH8vAAG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145302iA42401ED0F50D42D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGH8vAAG.png" alt="0695b00000bGH8vAAG.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why tDBCommit_1 does not commit every 1000 rows? What I am missing please?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:12:57 GMT</pubDate>
    <dc:creator>mr_burns</dc:creator>
    <dc:date>2024-11-15T22:12:57Z</dc:date>
    <item>
      <title>tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341588#M109530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;since the talend mysql components have no option "Commit every" (see &lt;A href="https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit" alt="https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit" target="_blank"&gt;https://community.talend.com/s/question/0D55b00008C8K8dCAF/question-on-mysql-database-and-commit&lt;/A&gt;) to commit data e.g. every 1000 rows I tried to find a workaround but could not succeed.&lt;/P&gt;&lt;P&gt;Here is my flow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGH4oAAG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150651iFCAFA05D0203B378/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGH4oAAG.png" alt="0695b00000bGH4oAAG.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the component view and also in the log the tJavaFlex_1 together with tRESTClient_1 get data in chunks of 1000.&lt;/P&gt;&lt;P&gt;Every 1000 rows are move forward to tDBOutput_1 to write into the mysql database.&lt;/P&gt;&lt;P&gt;Using tBCommit_1 I wanted to commit all 1000 rows but this is not working, monitoring the mysql database shows that the data does not come in chunks of 1000.&lt;/P&gt;&lt;P&gt;At the end of the job (using tPost_1) I have a final commit and only then all 20000 records are committed as once.&lt;/P&gt;&lt;P&gt;tDBOutput_1 and tDBCommit_1 are set to "Use an existing connection" and point to same tDBConnection_1 component.&lt;/P&gt;&lt;P&gt;If I use the output 'Main' from tDBOutput_1 into tDBCommit_1 then every record is committed - but this is also not what I want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connecting tDBCommit_1 to tJavaFlex_1 (OnSubjobOk) is also not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGH8vAAG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145302iA42401ED0F50D42D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGH8vAAG.png" alt="0695b00000bGH8vAAG.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why tDBCommit_1 does not commit every 1000 rows? What I am missing please?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341588#M109530</guid>
      <dc:creator>mr_burns</dc:creator>
      <dc:date>2024-11-15T22:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341589#M109531</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Try to iterate each input row and commit for each iteration. eg:&lt;/P&gt;&lt;P&gt;tJavaFlex--row1--tFlowToIterate--iterate--&amp;gt;tFixedFlowInput--main--tRestClient......oncomponentok--tDBCommit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tFixed​FlowInput: generate the current row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 15:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341589#M109531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-09T15:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341590#M109532</link>
      <description>&lt;P&gt;@Shong, thanks for reply.&lt;/P&gt;&lt;P&gt;I tried your suggestion:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGTyyAAG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136230i1A9690C571DD2325/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGTyyAAG.png" alt="0695b00000bGTyyAAG.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it is working now &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;tFixedFlowInput_1 I configured like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGTzIAAW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158301i134DA349FA420FCC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGTzIAAW.png" alt="0695b00000bGTzIAAW.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since it is working the problem is solved, but I do not really understand why I need to use tFlowToIterate_1 and tFixedFlowInput_1 to solve my problem.&lt;/P&gt;&lt;P&gt;Could you please explain it a bit more detailed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 09:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341590#M109532</guid>
      <dc:creator>mr_burns</dc:creator>
      <dc:date>2023-01-10T09:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341591#M109533</link>
      <description>&lt;P&gt;I wrote a component as a copy of tPostgresqlCommit years ago with a begin, main and end part where I can configure a number when a commit should be made. The component still works in Talend 8.0.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if I'm allowed to post the code here. Also, the component needs to be changed to MySQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bGU8AAAW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145748iD3040392A823607C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bGU8AAAW.png" alt="0695b00000bGU8AAAW.png" /&gt;&lt;/span&gt;Output:&lt;/P&gt;&lt;P&gt;Starting job CommitEvery at 11:20 10/01/2023.&lt;/P&gt;&lt;P&gt;[statistics] connecting to socket on port 3868&lt;/P&gt;&lt;P&gt;[statistics] connected&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 3000&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 5000&lt;/P&gt;&lt;P&gt;&amp;nbsp;commited 6000&lt;/P&gt;&lt;P&gt;&amp;nbsp;final commited 6666&lt;/P&gt;&lt;P&gt;[statistics] disconnected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Job CommitEvery ended at 11:20 10/01/2023. [Exit code&amp;nbsp;= 0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 10:41:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341591#M109533</guid>
      <dc:creator>borke02</dc:creator>
      <dc:date>2023-01-10T10:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341592#M109534</link>
      <description>&lt;P&gt;@Frank Borkenhagen​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks but in my case the webservice itself needs to be chunked to keep the responding data packages small.&lt;/P&gt;&lt;P&gt;To chunk only the insertion into the mysql database is not what I needed.&lt;/P&gt;&lt;P&gt;But may it is interesting for someone else.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 11:31:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341592#M109534</guid>
      <dc:creator>mr_burns</dc:creator>
      <dc:date>2023-01-10T11:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: tDBCommit every 1000 rows - how to?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341593#M109535</link>
      <description>&lt;P&gt;tDBCommit commit all the changes cached in​ the DB connection object. In your job design, tDBCommit is only executed one time, if you iterate the input data, tDBCommit is executed for each iteration. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 01:58:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBCommit-every-1000-rows-how-to/m-p/2341593#M109535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-11T01:58:23Z</dc:date>
    </item>
  </channel>
</rss>

