<?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: Data enrichment transform function for generating RRN for target table in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/2020052#M4540</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/211839"&gt;@Lohore&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please let us know the source/target DBs type and what's the exact usage, a usage sample is much helpful. We'd like to have more investigation for you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 12:52:57 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2022-12-27T12:52:57Z</dc:date>
    <item>
      <title>Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977160#M3636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to set a data enrichment transform function(target_lookup) for generating RRN. My situation demands generating RRN since my source table will be truncated and reloaded everyday and target table should continue with RRN value max(RRN) + 1 of the target table.&lt;/P&gt;
&lt;P&gt;I am trying to use the below data enrichment function but getting the mentioned error:&lt;/P&gt;
&lt;P&gt;case when target_lookup(0,"AWSTEST","PAYHISTDAY","max('RRN')",'','')==NULL&lt;BR /&gt;then 1&lt;BR /&gt;else target_lookup(0,"AWSTEST","PAYHISTDAY","max('RRN')",'','')+1&lt;BR /&gt;end&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;Command failed to load data with exit error code 1, Command output: ERROR: null value in column "RRN" violates not-null constraint&lt;/P&gt;
&lt;P&gt;Am I missing anything here, any help for resolving the error would be much appreciated.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Sundar Raman&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 23:48:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977160#M3636</guid>
      <dc:creator>sundar_r</dc:creator>
      <dc:date>2022-09-05T23:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977182#M3637</link>
      <description>&lt;P&gt;I think you have your quotes wrong.&lt;/P&gt;
&lt;P&gt;While the target database (you fail to indicate which one) may like double quotes around object, the Replicate documentation clearly indicates using single quotes to pass object names and expressions as strings to it.&lt;/P&gt;
&lt;P&gt;I would NOT quote the column name in the MAX function.&amp;nbsp; That's target SQL and normally does not need a quoted column name unless perhaps there is an uppercase/lowercase issue?&lt;/P&gt;
&lt;P&gt;If it still fails, you should try to get the exact sql statement as requested either from the target database SQL trace, or from the reptask log in verbose mode. Of course you'd try this in DEV with a test table with a single, or no more than a handful of rows.&lt;/P&gt;
&lt;P&gt;Finally I strongly encourage you NOT to use target_lookup but use a target DB computed value or trigger. Doing ( 2&amp;nbsp; per row) target lookups slows down Replicate a lot and is not even allowed on some (high&amp;nbsp; performance, CSV fed) DB's&amp;nbsp; such as Snowflake. Just do NOT replicate the RRN column and create a default value formula?&lt;/P&gt;
&lt;P&gt;Good luck,&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>Tue, 06 Sep 2022 01:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977182#M3637</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-09-06T01:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977777#M3658</link>
      <description>&lt;P&gt;Thanks Hein for the reply, my source table is DB2 and target is PostgreSQL. Looking at the verbose trace it looks like column name does require double quotes, removing them it throws an error. I tried creating a new target table with RRN column allowing null values and removing the primary key constraint, strangely it still throws the same error saying: n&lt;SPAN&gt;ull value in column "RRN" violates not-null constraint&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 19:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977777#M3658</guid>
      <dc:creator>sundar_r</dc:creator>
      <dc:date>2022-09-06T19:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977826#M3659</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Looking at the verbose trace it looks like column name does require double quotes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Show us.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 23:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1977826#M3659</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-09-06T23:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1980286#M3692</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/192644"&gt;@sundar_r&lt;/a&gt;&amp;nbsp;, copy&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;For NULL keyword the operator should be "is" rather than "==". Please use Replicate Expression Builder to make sure the expression is accurate.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 10:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/1980286#M3692</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2022-09-13T10:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/2020008#M4539</link>
      <description>&lt;P&gt;I wonder if your suggestions helped. As far as my knowledge goes, the issues described occur due to unoptimized functions in the table/CRM. Manual data enrichment is a time-consuming process that requires you to play detective, scouring company websites, Google, and individual LinkedIn and social media profiles. However, automated &lt;A href="https://www.globaldatabase.com/what-is-lead-enrichment" target="_self"&gt;lead enrichment&lt;/A&gt; is a real salvation for businesses involved in the sales sector.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 12:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/2020008#M4539</guid>
      <dc:creator>Lohore</dc:creator>
      <dc:date>2022-12-29T12:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data enrichment transform function for generating RRN for target table</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/2020052#M4540</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/211839"&gt;@Lohore&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please let us know the source/target DBs type and what's the exact usage, a usage sample is much helpful. We'd like to have more investigation for you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 12:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Data-enrichment-transform-function-for-generating-RRN-for-target/m-p/2020052#M4540</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2022-12-27T12:52:57Z</dc:date>
    </item>
  </channel>
</rss>

