<?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 Optimizing tReplicate with lookups in big tables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Optimizing-tReplicate-with-lookups-in-big-tables/m-p/2339252#M107418</link>
    <description>&lt;P&gt;I have a job that updates and deletes records in multiple tables based on the same input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm comparing the rm table in the v24 MSSQL db and in the v26, if a record was deleted in the v24, it has to be deleted in the v26. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJ5vTAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128077i3AB6B3C6774E4B37/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJ5vTAAS.png" alt="0695b00000fJ5vTAAS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what's happening with tMap_3, it finds the matching bl_id, fl_id and rm_id as keys.&lt;/P&gt;&lt;P&gt;But before deleting that record in the rm table, the three keys are used as foreign keys in other tables records and have to be deleted or updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in "rmpct" the records that have these three foreign keys are deleted, while in the other tables such as activity_log for example, the values of these three keys have to be emptied. So I use a tMap with a lookup to find the corresponding primary key and then update the values of these records. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJ612AAC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142344iED9ED45E5BA50F13/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJ612AAC.png" alt="0695b00000fJ612AAC.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do that for the different tables, I use a tReplicate but now the problem is that it takes a really long time (30 min). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how I could optimize this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:56:25 GMT</pubDate>
    <dc:creator>teal</dc:creator>
    <dc:date>2024-11-15T21:56:25Z</dc:date>
    <item>
      <title>Optimizing tReplicate with lookups in big tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Optimizing-tReplicate-with-lookups-in-big-tables/m-p/2339252#M107418</link>
      <description>&lt;P&gt;I have a job that updates and deletes records in multiple tables based on the same input data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm comparing the rm table in the v24 MSSQL db and in the v26, if a record was deleted in the v24, it has to be deleted in the v26. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJ5vTAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128077i3AB6B3C6774E4B37/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJ5vTAAS.png" alt="0695b00000fJ5vTAAS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what's happening with tMap_3, it finds the matching bl_id, fl_id and rm_id as keys.&lt;/P&gt;&lt;P&gt;But before deleting that record in the rm table, the three keys are used as foreign keys in other tables records and have to be deleted or updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in "rmpct" the records that have these three foreign keys are deleted, while in the other tables such as activity_log for example, the values of these three keys have to be emptied. So I use a tMap with a lookup to find the corresponding primary key and then update the values of these records. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJ612AAC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142344iED9ED45E5BA50F13/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJ612AAC.png" alt="0695b00000fJ612AAC.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do that for the different tables, I use a tReplicate but now the problem is that it takes a really long time (30 min). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how I could optimize this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Optimizing-tReplicate-with-lookups-in-big-tables/m-p/2339252#M107418</guid>
      <dc:creator>teal</dc:creator>
      <dc:date>2024-11-15T21:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Optimizing tReplicate with lookups in big tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Optimizing-tReplicate-with-lookups-in-big-tables/m-p/2339253#M107419</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;All tMap output is executed in parallel, which takes up more memory resources.&lt;/P&gt;&lt;P&gt;You can optimize job design from the following aspects:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Store the lookup data on disk instead of memory if the volume of lookup data is big. (see below image)&lt;/LI&gt;&lt;LI&gt;Allocate more memory to the job execution.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJBSXAA4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137292i48197A8EACD38523/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJBSXAA4.png" alt="0695b00000fJBSXAA4.png" /&gt;&lt;/span&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 06:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Optimizing-tReplicate-with-lookups-in-big-tables/m-p/2339253#M107419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-04T06:29:19Z</dc:date>
    </item>
  </channel>
</rss>

