<?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: How do you define upper segment boundary for parallel load? in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079216#M6255</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2924"&gt;@desmondchew&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out!&lt;/P&gt;
&lt;P&gt;If I understood the issue correctly, you input the segments values in decreasing order, eg&amp;nbsp;&lt;SPAN&gt;60000000,&amp;nbsp;50000000,...10000000 in the Parallel Load Segments Boundaries window of the table setting. Then you get extra rows in target side after full load done.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is reasonable because the segments values order is sensitive, Replicate will compose the unload SQL by using these values and their order, the latter value is treated as "the upper data range". Please input the values in increasing order, let's say&amp;nbsp;10000000,20000000...60000000.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Typical the correct unload SQL looks like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE style="background-color: lightgrey; width: 100%; border-style: none;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE ( ("ID" &amp;lt;= 1000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 1000) )) AND ( ("ID" &amp;lt;= 2000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 2000) )) AND ( ("ID" &amp;lt;= 3000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 3000) )) AND ( ("ID" &amp;lt;= 4000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 4000) )) AND ( ("ID" &amp;lt;= 5000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 5000) )) AND ( ("ID" &amp;lt;= 6000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 6000) ))&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;If you like you can set SOURCE_UNLOAD to Trace and then check the lines in task log file to understand further:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Select statement for UNLOAD is ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You will see all SQLs and their values.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2023 05:35:02 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2023-06-02T05:35:02Z</dc:date>
    <item>
      <title>How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079179#M6247</link>
      <description>&lt;P&gt;We have a table having one primary key (SNP_ID). TABLE: TRANS_TBL&lt;/P&gt;
&lt;P&gt;select max(snp_id) from TRANS_TBL&lt;BR /&gt;--- 58,251,744&lt;/P&gt;
&lt;P&gt;select min(snp_id) from TRANS_TBL&lt;BR /&gt;--1&lt;/P&gt;
&lt;P&gt;Assuming we are using 6 segments.&lt;/P&gt;
&lt;P&gt;Each segment would look like&lt;/P&gt;
&lt;P&gt;1 - 10000000&lt;/P&gt;
&lt;P&gt;2 - 20000000&lt;/P&gt;
&lt;P&gt;3 - 30000000&lt;/P&gt;
&lt;P&gt;4 - 40000000&lt;/P&gt;
&lt;P&gt;5 - 50000000&lt;/P&gt;
&lt;P&gt;6 - 60000000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this correct? I ever tested in descending order however the full loading took ages like going into a loop loading much more records that it should.&lt;/P&gt;
&lt;P&gt;Please let me know if this setup is workable?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;Desmond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 00:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079179#M6247</guid>
      <dc:creator>desmondchew</dc:creator>
      <dc:date>2023-06-02T00:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079216#M6255</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2924"&gt;@desmondchew&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out!&lt;/P&gt;
&lt;P&gt;If I understood the issue correctly, you input the segments values in decreasing order, eg&amp;nbsp;&lt;SPAN&gt;60000000,&amp;nbsp;50000000,...10000000 in the Parallel Load Segments Boundaries window of the table setting. Then you get extra rows in target side after full load done.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is reasonable because the segments values order is sensitive, Replicate will compose the unload SQL by using these values and their order, the latter value is treated as "the upper data range". Please input the values in increasing order, let's say&amp;nbsp;10000000,20000000...60000000.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Typical the correct unload SQL looks like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE style="background-color: lightgrey; width: 100%; border-style: none;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE ( ("ID" &amp;lt;= 1000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 1000) )) AND ( ("ID" &amp;lt;= 2000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 2000) )) AND ( ("ID" &amp;lt;= 3000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 3000) )) AND ( ("ID" &amp;lt;= 4000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 4000) )) AND ( ("ID" &amp;lt;= 5000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 5000) )) AND ( ("ID" &amp;lt;= 6000) )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SELECT ... FROM ... WHERE (NOT (("ID" &amp;lt;= 6000) ))&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;If you like you can set SOURCE_UNLOAD to Trace and then check the lines in task log file to understand further:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Select statement for UNLOAD is ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You will see all SQLs and their values.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 05:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079216#M6255</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-06-02T05:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079316#M6260</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;What if the table has two columns primary keys (ID, EMPNO)? How can I define the multiple segments?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Thank you.&lt;BR /&gt;Desmond&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 09:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079316#M6260</guid>
      <dc:creator>desmondchew</dc:creator>
      <dc:date>2023-06-02T09:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079577#M6274</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;What if the table has two columns primary keys (ID, EMPNO)? How can I define the multiple segment&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The "select segment columns" is plural. You can pick more than 1 and you'll be given the option to provide values for both.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For some cases that obviously makes sense, but for an example you indicate you pick either. If the primary (cluster) order is a highly granular ID then pick that for easy source search. Now if ID is not at all selective, but perhaps a country code, then you might want ranges within&amp;nbsp; given ID and need to provide both. You wouldn't want to skip a first-order segment as that upsets the source engine. It would have to do much more scanning.&lt;/P&gt;
&lt;P&gt;Hein&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 21:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079577#M6274</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-06-02T21:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079611#M6275</link>
      <description>&lt;P&gt;I am reading the guide in link &lt;A href="https://help.qlik.com/en-US/replicate/November2022/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/Parallel_Load.htm" target="_blank"&gt;https://help.qlik.com/en-US/replicate/November2022/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/Parallel_Load.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So we have three columns as a composite primary keys. We know that first columns needs to be in ascending order. Does column two needs to be in descending order as per the guide? While the third column can be any order but the last segment needs to be the least value within the third column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 23:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079611#M6275</guid>
      <dc:creator>desmondchew</dc:creator>
      <dc:date>2023-06-02T23:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079874#M6276</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;EM&gt;Does column two needs to be in descending order as per the guide?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I do not see this indicated in the guide, nor in the link you provided. Can you provided a specific reference?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let's take a step back. What is the goal of the segmentation? It is not a filter as such, so all the data will be loaded, but there is an attempt to select segments/chunks which can be processed in parallel to speed up the load. Ideally each segment would have a similar load time, which typically means a similar number of rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is best if&amp;nbsp; the source database can 'find' the segments readily. That in turns means it is best if the segments are along PK boundaries such that the DB can directly select a starting point for a segment, and does not need a scan nor sort. The number of PK columns you use should just be 'just enough' to make similar chunks, and no more. 'Similar' depends on how many segment you target but is probably such that the row count for each segment is within 10% or even 20% of the average rows count.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That's easy for a slowly increasing numeric PK such as we might see&amp;nbsp; for a table with sequence number as PK.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's also easy for a DATE or YEAR as PK for example order number which start with YYNNNNN each year starting at 000001. Just pick a 'comfortable' number of years. Maybe 10 years in the first segment, 3 years in the next few and every year for the segments after business started booming :-).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now if the PK is something a phone number or SSN this gets tricky - some 'area codes' will have many more than others. You may just want to analyze, counting for each area code and putting it in a table/program to see approx which area codes down to exchange?) to select to get similar segment.&amp;nbsp; Ditto for 'last-name'. Just count once for every 3 or 4 character start, add a running count, and select your boundaries.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;On target every index will be ascending (ref guide: "&lt;/SPAN&gt;&lt;EM&gt;A unique index consisting of several ascending and descending columns will always be replicated to &lt;/EM&gt;&lt;EM&gt;the target as ascending columns. In other words, the descending columns will become ascending &lt;/EM&gt;&lt;EM&gt;columns.&lt;/EM&gt;&lt;SPAN&gt; ". On the source segment selection you should stick to choice that allow the source DB to make 'easy' select start + scan possible.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The example in the Replicate Reference guide is just crazy IMHO. Who here has any clue as to what the goals is there? Maybe if you are more specific about your columns with a few examples, and about your goals, someone can help better? I'd say KISS - Keep It Simple S...ir.&amp;nbsp; ( &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; ).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps some, Hein.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2023 20:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2079874#M6276</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-06-04T20:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463273#M11585</link>
      <description>&lt;P&gt;Hi, My source is oracle, I am trying to perform full load for one of a big table unfortunatly the table doesn't have any key column but my manager asking me to use row id as segments. will it possible to use row id as parallel segment?&amp;nbsp; please confirm.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 06:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463273#M11585</guid>
      <dc:creator>vlokeswa</dc:creator>
      <dc:date>2024-06-18T06:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463648#M11602</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/252464"&gt;@vlokeswa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Welcome to Qlik Community forum and thanks for reaching out here!&lt;/P&gt;
&lt;P&gt;Key (or index) columns are not mandatory for Parallel Load. Any column can be used as a segment column as long as it can divide the data into segments. However, if the table has a primary key (PK), the performance will be better.&lt;/P&gt;
&lt;P&gt;Currently, Oracle data types &lt;A title="ROWID/UROWID are not supported" href="https://help.qlik.com/en-US/replicate/November2023/Content/Replicate/Main/Oracle/ora_source_data_types.htm#ar_oracleds_385117211_1677127:~:text=ROWID,UROWID" target="_blank" rel="noopener"&gt;&lt;FONT face="courier new,courier"&gt;ROWID/UROWID&lt;/FONT&gt; are not supported&lt;/A&gt; in current major versions of Qlik Replicate. As a result, columns with these data types will not be visible in the Qlik Replicate GUI, making it impossible to utilize ROWID directly in Parallel Load design Window.&lt;/P&gt;
&lt;P&gt;I am working on an article that demonstrates how to use ROWID in Parallel Load. I will share the detailed steps with you shortly.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 03:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463648#M11602</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-06-19T03:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do you define upper segment boundary for parallel load?</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463887#M11613</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/252464"&gt;@vlokeswa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please check below article to see the detailed steps:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Qlik Replicate and Oracle source endpoint: &lt;A title="use ROWID as segment column in Parallel Load" href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-and-Oracle-source-endpoint-use-ROWID-as-segment/ta-p/2463680" target="_blank" rel="noopener"&gt;use ROWID as segment column in Parallel Load&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 14:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/How-do-you-define-upper-segment-boundary-for-parallel-load/m-p/2463887#M11613</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-06-19T14:08:29Z</dc:date>
    </item>
  </channel>
</rss>

