<?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: Join SAP HANA tables using source_lookup in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412482#M9174</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/162751"&gt;@Al_gar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Depends on which component(s) lead the problem, you may try to set some components to Trace, or Verbose (if trace level still cannot provide enough information). In general please do not set all of the components to Verbose, it will make huge task log file and it's hard to read.&lt;/P&gt;
&lt;P&gt;If problem is at source side:&lt;/P&gt;
&lt;P&gt;-- For full load, set &lt;FONT face="courier new,courier"&gt;source_unload&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;-- For CDC stage , set &lt;FONT face="courier new,courier"&gt;source_capture&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;If problem is at target side:&lt;/P&gt;
&lt;P&gt;-- For full load, set &lt;FONT face="courier new,courier"&gt;target_load&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;-- For CDC stage , set &lt;FONT face="courier new,courier"&gt;target_apply&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;or you can combine the components by Full Load, or CDC, for example &lt;FONT face="courier new,courier"&gt;source_capture&lt;/FONT&gt; &amp;amp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;target_apply&lt;/FONT&gt; are used to troubleshoot CDC stage issues. Certainly you may set other components too depends on needs.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2024 11:05:21 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2024-01-30T11:05:21Z</dc:date>
    <item>
      <title>Join SAP HANA tables using source_lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2411678#M9109</link>
      <description>&lt;P&gt;I'm trying to use the Replicate source_lookup function to join SAP HANA tables, but the task just fails.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source - SAP HANA with Trigger-based CDC&lt;BR /&gt;Target - MS SQL Server&amp;nbsp;&lt;BR /&gt;Replicate - Nov 2022&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Here's an example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Source tables: sch.Product, sch.Category&lt;BR /&gt;Target table: dbo.Inventory&lt;/P&gt;
&lt;P&gt;In the Transform tab of the table named sch.Product I added column named Sales_Category with expression:&amp;nbsp;&lt;EM&gt;source_lookup('NO_CHACHING','sch','Category','category_name','cat_id=?',$cat_fkid).&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;However, when I start/reload the task it will fail and trace log for SOURCE_CAPTURE shows "Data lookup statement for table 'sch.Category' was not found in the pool, going to allocate a new statement (statement_manager.c:2132)". However that table does exist in the SAP HANA database.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I fix this error and get the source_lookup to work?&lt;/P&gt;
&lt;P&gt;At the moment I'm trying to join 2 tables, but is it possible to join more than 2?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jan 2024 22:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2411678#M9109</guid>
      <dc:creator>Al_gar</dc:creator>
      <dc:date>2024-01-28T22:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Join SAP HANA tables using source_lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2411709#M9112</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/162751"&gt;@Al_gar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to Qlik Community!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;However, when I start/reload the task it will fail and trace log for SOURCE_CAPTURE shows "Data lookup statement for table 'sch.Category' was not found in the pool, going to allocate a new statement (statement_manager.c:2132)". However that table does exist in the SAP HANA database.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This messages means the SQL Statement does not exist, Replicate will build it; not means the table does not exist.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;At the moment I'm trying to join 2 tables, but is it possible to join more than 2?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I do not see it's doable within Qlik Replicate source_lookup, the design is complex and the performance is not good. I'd like to suggest you define &lt;A title="VIEW " href="https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/20d5fa9b75191014a33eee92692f1702.html" target="_blank" rel="noopener"&gt;VIEW&lt;/A&gt; in the source database and access the VIEW in Qlik Replicate.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 02:34:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2411709#M9112</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-01-29T02:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join SAP HANA tables using source_lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412244#M9158</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;. Can you point out what log traces should I increase to troubleshoot why the task is failing with error message "The task stopped abnormally"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 02:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412244#M9158</guid>
      <dc:creator>Al_gar</dc:creator>
      <dc:date>2024-01-30T02:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Join SAP HANA tables using source_lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412269#M9160</link>
      <description>&lt;P&gt;Dear &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/162751"&gt;@Al_gar&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;The source_lookup function uses a value that you provide in an expression to find a corresponding value in a file or different table. It is a useful alternative to join operations, especially when you want to avoid null values or duplicate keys.&lt;/P&gt;
&lt;P&gt;One possible reason for your error is that you are using the NO_CHACHING option, which means that the lookup table is not cached and the lookup function has to query the database every time it needs a value. This could cause performance issues and errors if the database connection is not stable or the table is not accessible.&lt;/P&gt;
&lt;P&gt;To fix this error, you could try to use the CACHING option instead, which means that the lookup table is cached in memory and the lookup function can access it faster and more reliably. You can also specify the cache size and refresh interval to control how often the cache is updated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the CACHING option, you need to modify your expression as follows:&lt;/P&gt;
&lt;P&gt;source_lookup(‘CACHING’,‘sch’,‘Category’,‘category_name’,‘cat_id=?’,$cat_fkid,1000,60)&lt;/P&gt;
&lt;P&gt;This means that the lookup table will be cached with a size of 1000 rows and a refresh interval of 60 seconds.&lt;/P&gt;
&lt;P&gt;To answer your second question, yes, it is possible to join more than two tables using source_lookup function. You just need to use multiple source_lookup expressions in the Transform tab of the target table, one for each source table that you want to join. For example, if you want to join three tables: sch.Product, sch.Category, and sch.Supplier, you could use the following expressions:&lt;/P&gt;
&lt;P&gt;Sales_Category = source_lookup(‘CACHING’,‘sch’,‘Category’,‘category_name’,‘cat_id=?’,$cat_fkid,1000,60) Supplier_Name = source_lookup(‘CACHING’,‘sch’,‘Supplier’,‘supplier_name’,‘sup_id=?’,$sup_fkid,1000,60)&lt;/P&gt;
&lt;P&gt;This would add two columns to the target table: Sales_Category and Supplier_Name, with the values from the corresponding source tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps you resolve the issue.Have a nice day! &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If our response has been helpful, please consider clicking "Accept as Solution". This will assist other users in easily finding the ans&lt;/P&gt;
&lt;P&gt;wer.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Deepak&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 04:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412269#M9160</guid>
      <dc:creator>deepaksahirwar</dc:creator>
      <dc:date>2024-01-30T04:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Join SAP HANA tables using source_lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412482#M9174</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/162751"&gt;@Al_gar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Depends on which component(s) lead the problem, you may try to set some components to Trace, or Verbose (if trace level still cannot provide enough information). In general please do not set all of the components to Verbose, it will make huge task log file and it's hard to read.&lt;/P&gt;
&lt;P&gt;If problem is at source side:&lt;/P&gt;
&lt;P&gt;-- For full load, set &lt;FONT face="courier new,courier"&gt;source_unload&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;-- For CDC stage , set &lt;FONT face="courier new,courier"&gt;source_capture&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;If problem is at target side:&lt;/P&gt;
&lt;P&gt;-- For full load, set &lt;FONT face="courier new,courier"&gt;target_load&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;-- For CDC stage , set &lt;FONT face="courier new,courier"&gt;target_apply&lt;/FONT&gt; to Verbose&lt;/P&gt;
&lt;P&gt;or you can combine the components by Full Load, or CDC, for example &lt;FONT face="courier new,courier"&gt;source_capture&lt;/FONT&gt; &amp;amp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;target_apply&lt;/FONT&gt; are used to troubleshoot CDC stage issues. Certainly you may set other components too depends on needs.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 11:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Join-SAP-HANA-tables-using-source-lookup/m-p/2412482#M9174</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-01-30T11:05:21Z</dc:date>
    </item>
  </channel>
</rss>

