<?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: Target Lookup in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467359#M11782</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/288931"&gt;@srikar22&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the article regarding Target_lookup for your reference:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Transformation-Target-Lookup-Insert-Date/ta-p/1805653" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Transformation-Target-Lookup-Insert-Date/ta-p/1805653&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you still need assistance, I recommend contacting Professional Service.&lt;/P&gt;
&lt;P&gt;Because Target_lookup impacts the performance of your data load so implement it with the help of our expertise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Swathi&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 20:43:01 GMT</pubDate>
    <dc:creator>SwathiPulagam</dc:creator>
    <dc:date>2024-07-02T20:43:01Z</dc:date>
    <item>
      <title>Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467355#M11781</link>
      <description>&lt;P&gt;We are unable to load the data using the target lookup getting an error&lt;/P&gt;
&lt;P&gt;target_lookup('NO_CACHING','TargetSchema','TargetTable','max(load_date)','','') &amp;lt; $LOAD_DATE&lt;/P&gt;
&lt;P&gt;We are using the following Target lookup&amp;nbsp; to load the table only when the Load date from the source table is greater than Load date in Target table.&lt;/P&gt;
&lt;P&gt;We are using this target_lookup in FullLoad Filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the error.&lt;/P&gt;
&lt;P&gt;Stream component 'st_1_ORA_FINCAPRD' terminated&lt;BR /&gt;Stream component failed at subtask 1, component st_1_ORA_FINCAPRD &lt;BR /&gt;Error executing source loop&lt;BR /&gt;Endpoint is disconnected&lt;BR /&gt;Failed to init unloading table 'SNAPLOGIC'.'WEEKLY_CCS_EXPEND'&lt;BR /&gt;ORA-00911: invalid character&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 19:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467355#M11781</guid>
      <dc:creator>srikar22</dc:creator>
      <dc:date>2024-07-02T19:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467359#M11782</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/288931"&gt;@srikar22&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the article regarding Target_lookup for your reference:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Transformation-Target-Lookup-Insert-Date/ta-p/1805653" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/Qlik-Replicate-Transformation-Target-Lookup-Insert-Date/ta-p/1805653&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you still need assistance, I recommend contacting Professional Service.&lt;/P&gt;
&lt;P&gt;Because Target_lookup impacts the performance of your data load so implement it with the help of our expertise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Swathi&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 20:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467359#M11782</guid>
      <dc:creator>SwathiPulagam</dc:creator>
      <dc:date>2024-07-02T20:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467360#M11783</link>
      <description>&lt;P&gt;Hello Swathi,&lt;/P&gt;
&lt;P&gt;I already looked up that post.Please let us know how to form a Target lookup for my use case.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 20:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467360#M11783</guid>
      <dc:creator>srikar22</dc:creator>
      <dc:date>2024-07-02T20:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467746#M11810</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;target_lookup('NO_CACHING','TargetSchema','TargetTable','max(load_date)','','') &amp;lt; $LOAD_DATE&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Please provide the EXACT syntax uses. Cleary this is just a made up example with at least faked target names and perhaps more was wrong, but i think it was fine here.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; Failed to init unloading table 'SNAPLOGIC'.'WEEKLY_CCS_EXPEND'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;ORA-00911: invalid character&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The (TARGET|SOURCE)_LOOKUP function perform a string manipulation to generate SQL code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF00FF"&gt;select&lt;/FONT&gt; EXP &lt;FONT color="#FF00FF"&gt;from&lt;/FONT&gt; SCHM.TBL &lt;FONT color="#FF00FF"&gt;where&lt;/FONT&gt; EXP&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You did not provide an EXP string, so the result became:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF00FF"&gt;select&lt;/FONT&gt;&amp;nbsp;&lt;EM&gt;max(load_date)&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;FONT color="#FF00FF"&gt;from&lt;/FONT&gt;&amp;nbsp;&lt;EM&gt;TargetSchema,TargetTable&amp;nbsp;&lt;/EM&gt;&amp;nbsp;&lt;FONT color="#FF00FF"&gt;where&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That's not valid SQL and Oracle complained.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest you retry using for example&amp;nbsp;&lt;FONT color="#339966"&gt;1=1&lt;/FONT&gt; as EXP.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hein.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 16:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467746#M11810</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-07-03T16:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467751#M11811</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;I am trying to avoid duplicates in the target table&lt;/P&gt;
&lt;P&gt;I am trying to load target data using a filter on load_date. if the source table load_date is greater than Target table load_date then only insert the data if not ignore the replication to target&lt;/P&gt;
&lt;P&gt;Here is the syntax I am using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$LOAD_DATE &amp;gt; target_lookup('NO_CACHING','qlik_replicate','weekly_ccs_expend_old','max(load_date)','load_date=:1','$LOAD_DATE')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the Log Message&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Target endpoint does not support data enrichment feature&lt;/P&gt;
&lt;P&gt;Source is Oracle&lt;/P&gt;
&lt;P&gt;Target is Redshift&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 17:13:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467751#M11811</guid>
      <dc:creator>srikar22</dc:creator>
      <dc:date>2024-07-03T17:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467753#M11812</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You first post reported "&lt;SPAN&gt;ORA-00911: invalid character" strongly suggesting an Oracle endpoint, and nothing to the contrary was indicated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now you write "Target is Redshift".&amp;nbsp;That's a whole other animal.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And indeed "Target endpoint does not support data enrichment feature"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Replicate R&amp;amp;D apparently believes that it cannot provide a useable solution (performance wise) for a Redshift target. It would be too slow, and soo expensive queries to perform against a datawarehouse style target. A similar restriction exists for Snowflake.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You may want to look for a better design. Perhaps just using error handling "update row if exists" which will pre-delete (if exists) and re-insert. That's cheaper than testing to avoid dups. And check out (search) "Full Load Passthru" filtering to avoid bringing in too much data. For example:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/Filter-for-last-90-days-of-data-in-Qlik-Replicate/ta-p/1880761&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hein.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 17:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467753#M11812</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-07-03T17:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467821#M11814</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/288931"&gt;@srikar22&lt;/a&gt;&amp;nbsp; - &amp;nbsp; I tried to reproduce "&lt;SPAN&gt;ORA-00911: invalid character" but did not get it so far.&amp;nbsp; &lt;/SPAN&gt;What replicate version? What was the exact lookup statement you used?&lt;SPAN&gt;&amp;nbsp;I only got "[SOURCE_CAPTURE ]E: Failed to rebind parameter for data lookup".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I got that when using&amp;nbsp; source_lookup(.... TBL,'','').&amp;nbsp; as well as&amp;nbsp;source_lookup(.... TBL,'1=1','').&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I could not use&amp;nbsp;source_lookup(.... TBL) omitting COND,COND_PARAMS completely. That gives a parse error in the designer gui.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What did work for me is : source_lookup(.... TBL,'1=1') - omitting&amp;nbsp;COND_PARAMS.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121014"&gt;@Dana_Baldwin&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt;&amp;nbsp; - maybe someone can submit a minor code/documentation enhancement to allow lookups wit not condition, essentially leaving out the WHERE clause. And we may want to document the '1=1' style workaround and being able to omit the&amp;nbsp;COND_PARAMS maybe writing ....,COND [,COND_PARAMS] )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hein.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 03:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467821#M11814</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-07-04T03:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467851#M11817</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I can open an internal ticket for this issue. It appears that the WHERE clause is essential to ensure that the primary key or unique index is utilized, rather than performing a full table scan. This will help prevent the lookup() query from impacting the database performance.&lt;/P&gt;
&lt;P&gt;Additionally, the lookup() query should return exactly one row if the row exists. Without a WHERE clause, it is challenging to guarantee the uniqueness of the result set.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 05:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2467851#M11817</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-07-04T05:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2468004#M11838</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;nbsp;&amp;nbsp;It appears that the WHERE clause is essential to ensure that the primary key or unique index is utilized, rather than performing a full table scan.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I get that, but that's not up to Replicate to decide. And Replicate should never knowingly send bad SQL to a database IMHO specially here where it is probably easy to fix.&lt;/P&gt;
&lt;P&gt;The intended/expected (target|source)_lookup is a possibly very large table of values with a unique key.&lt;/P&gt;
&lt;P&gt;But that's not what customers come up with. They use "exists" to give a singleton yeah/nay. They use a min or max with a 1 hour or 1 day cache. They can design a control table with a single row and a cut-off date, or enable flag. In Oracle they can use a SELECT X FROM DUAL perhaps just to see if they are in development or prod ?!&lt;/P&gt;
&lt;P&gt;In short, I believe there are many circumstance where no selection expression may be needed and it would be nice if that was simply allowed. If it is not allowed then report during task edit/load/activate - do not send a broken statement to a DB to find out.&lt;/P&gt;
&lt;P&gt;fwiw,&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 12:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2468004#M11838</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2024-07-04T12:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Target Lookup</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2468053#M11840</link>
      <description>&lt;P&gt;Thanks for the detailed explanation,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp;, I will open an internal ticket.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 13:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Target-Lookup/m-p/2468053#M11840</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-07-04T13:59:36Z</dc:date>
    </item>
  </channel>
</rss>

